Exemplo n.º 1
0
 public void TestTestContainerBasicNamedService()
 {
     TestContainer container = new TestContainer(@"Concrete\Castle\AOP\HelperClasses\ConfigSample1.config");
     SomeClass sc = new SomeClass();
     Assert.AreNotEqual(sc, container.Resolve("someclass"));
     container.AddNamedServiceOverride("someclass", sc);
     Assert.AreEqual(sc, container.Resolve("someclass"));
 }
Exemplo n.º 2
0
 public void TestTestContainerBasic()
 {
     TestContainer container = new TestContainer(@"Concrete\Castle\AOP\HelperClasses\ConfigSample1.config");
     SomeClass sc = new SomeClass();
     ISomething smth = container.Resolve<ISomething>();
     Assert.AreNotEqual(sc, smth);
     container.AddServiceOverride(typeof(ISomething), sc);
     Assert.AreEqual(sc, container.Resolve<ISomething>());
 }