something
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Tests.Runtime.Engine {
|
||||
public class DIContextTests {
|
||||
[Test]
|
||||
public void Single_Bind_And_Resolve() {
|
||||
DIContext context = new();
|
||||
DIContext context = new DIContext();
|
||||
context.Bind<ITestService>(new TestServiceA());
|
||||
|
||||
ITestService testService = context.Resolve<ITestService>();
|
||||
@@ -36,10 +36,10 @@ namespace Tests.Runtime.Engine {
|
||||
|
||||
[Test]
|
||||
public void Single_Bind_And_Field_Inject() {
|
||||
DIContext context = new();
|
||||
DIContext context = new DIContext();
|
||||
context.Bind<ITestService>(new TestServiceB());
|
||||
|
||||
TestObject obj = new();
|
||||
TestObject obj = new TestObject();
|
||||
context.Inject(obj);
|
||||
|
||||
Assert.IsNotNull(obj.Service, "obj.Service != null");
|
||||
@@ -48,10 +48,10 @@ namespace Tests.Runtime.Engine {
|
||||
|
||||
[Test]
|
||||
public void Single_Bind_And_Method_Inject() {
|
||||
DIContext context = new();
|
||||
DIContext context = new DIContext();
|
||||
context.Bind<ITestService>(new TestServiceA());
|
||||
|
||||
TestObjectMethod obj = new();
|
||||
TestObjectMethod obj = new TestObjectMethod();
|
||||
context.Inject(obj);
|
||||
|
||||
Assert.IsNotNull(obj.Service, "obj.Service != null");
|
||||
|
||||
Reference in New Issue
Block a user