public void TransientRegister_Success() { ITestCase testCase = new TestCaseA(); var c = new Container(); c = (Container)testCase.TransientRegister(c); var obj1 = c.Resolve<ITestA>(); var obj2 = c.Resolve<ITestA>(); Assert.AreNotEqual(obj1, obj2); Helper.Check(obj1, false); Helper.Check(obj2, false); }
public void SingletonRegister_Success() { ITestCase testCase = new TestCaseA(); var c = new Container(); c = (Container)testCase.SingletonRegister(c); var obj1 = c.Resolve<ITestA>(); var obj2 = c.Resolve<ITestA>(); Assert.AreEqual(obj1, obj2); Helper.Check(obj1, true); Helper.Check(obj2, true); }