Skip to content

Commit

Permalink
satisfy codefactor (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus authored Feb 11, 2024
1 parent 5b87405 commit d60a680
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
15 changes: 10 additions & 5 deletions src/cs/Bootsharp.Common.Test/Mocks.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
namespace Bootsharp.Common.Test;
global using static Bootsharp.Common.Test.Mocks;

public interface IBackend;
public interface IFrontend;
public class Backend : IBackend;
public class Frontend : IFrontend;
namespace Bootsharp.Common.Test;

public static class Mocks
{
public interface IBackend;
public interface IFrontend;
public class Backend : IBackend;
public class Frontend : IFrontend;
}
1 change: 0 additions & 1 deletion src/cs/Bootsharp.Common.Test/TypesTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Reflection;
using Bootsharp;
using Bootsharp.Common.Test;

[assembly: JSExport(typeof(IBackend))]
[assembly: JSImport(typeof(IFrontend))]
Expand Down
2 changes: 1 addition & 1 deletion src/cs/Bootsharp.Inject.Test/ExtensionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void CanInitializeGeneratedTypes ()
public void WhenMissingRequiredDependencyErrorIsThrown ()
{
AddAutogenerated();
Assert.Contains("Failed to run Bootsharp: 'Bootsharp.Inject.Test.IBackend' dependency is not registered.",
Assert.Contains("Failed to run Bootsharp: 'Bootsharp.Inject.Test.Mocks+IBackend' dependency is not registered.",
Assert.Throws<Error>(() => new ServiceCollection().AddBootsharp().BuildServiceProvider().RunBootsharp()).Message);
}

Expand Down
25 changes: 15 additions & 10 deletions src/cs/Bootsharp.Inject.Test/Mocks.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
namespace Bootsharp.Inject.Test;
global using static Bootsharp.Inject.Test.Mocks;

public interface IBackend;
public interface IFrontend;
public class Backend : IBackend;
public class Frontend : IFrontend;
public class JSFrontend : IFrontend;
namespace Bootsharp.Inject.Test;

public class JSBackend
public static class Mocks
{
public static IBackend Handler { get; private set; }
public interface IBackend;
public interface IFrontend;
public class Backend : IBackend;
public class Frontend : IFrontend;
public class JSFrontend : IFrontend;

public JSBackend (IBackend handler)
public class JSBackend
{
Handler = handler;
public static IBackend Handler { get; private set; }

public JSBackend (IBackend handler)
{
Handler = handler;
}
}
}

0 comments on commit d60a680

Please sign in to comment.