- add more registrationFactory tests

pull/32/head
Simon Gockner 6 years ago
parent de702e72a9
commit 8cdeb19770
  1. 16
      Test.LightweightIocContainer/IocContainerTest.cs

@ -117,7 +117,23 @@ namespace Test.LightweightIocContainer
public void TestRegister() public void TestRegister()
{ {
Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(ITest), typeof(Test)))); Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(ITest), typeof(Test))));
}
[Test]
public void TestRegisterTypeWithoutInterface()
{
Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(Test)))); Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(Test))));
}
[Test]
public void TestRegisterMultiton()
{
Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(ITest), typeof(Test), typeof(MultitonScope))));
}
[Test]
public void TestRegisterFactory()
{
Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.RegisterFactory(typeof(ITestFactory), _iocContainer))); Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.RegisterFactory(typeof(ITestFactory), _iocContainer)));
} }

Loading…
Cancel
Save