Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

satisfy codefactor #147

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
}
Loading