public void TestAspect() { ObjectContainer.SetContainer(new AutofacObjectContainer()); ObjectContainer.Register <ITestAspect, TestAspect>(); ObjectContainer.Build(); var service = ObjectContainer.Resolve <ITestAspect>(); Assert.AreEqual(service.T(), true); }
public void TestAutofac() { ObjectContainer.SetContainer(new AutofacObjectContainer()); ObjectContainer.Register <MockTestService, MockTestService>(); ObjectContainer.Build(); var service = ObjectContainer.Resolve <MockTestService>(); Assert.AreNotEqual(service, null); Assert.AreEqual(service.Test(), true); }
public static void Build() { ObjectContainer.Build(); }
public void TestBasic() { ObjectContainer.SetContainer(new MockObjectContainer()); ObjectContainer.Build(); }
public Configuration BuildContainer() { ObjectContainer.Build(); return(this); }