From 8cdeb19770aeead1aa1ee01496a5a8d437b3fa95 Mon Sep 17 00:00:00 2001 From: Simon Gockner Date: Fri, 11 Oct 2019 15:06:39 +0200 Subject: [PATCH] - add more registrationFactory tests --- Test.LightweightIocContainer/IocContainerTest.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Test.LightweightIocContainer/IocContainerTest.cs b/Test.LightweightIocContainer/IocContainerTest.cs index b9dc39e..aaed517 100644 --- a/Test.LightweightIocContainer/IocContainerTest.cs +++ b/Test.LightweightIocContainer/IocContainerTest.cs @@ -117,7 +117,23 @@ namespace Test.LightweightIocContainer public void TestRegister() { Assert.DoesNotThrow(() => _iocContainer.Register(RegistrationFactory.Register(typeof(ITest), typeof(Test)))); + } + + [Test] + public void TestRegisterTypeWithoutInterface() + { 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))); }