public void RegisterGlobalServicesRegistersIFindCustomerService() { TestableModuleInitializer module = new TestableModuleInitializer(); MockServiceCollection serviceCollection = new MockServiceCollection(); module.TestAddGlobalServices(serviceCollection); Assert.IsTrue(serviceCollection.RegistedServices.ContainsKey(typeof(IFindCustomerService))); }
public void LoadCallsAddModuleServices() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew<TestableRootCompositionContainer>("TEST"); TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add<IHttpContextLocatorService>(contextLocator); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.AddModuleServicesWasCalled); }
public void LoadCallsAddModuleServices() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew <TestableRootCompositionContainer>("TEST"); TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add <IHttpContextLocatorService>(contextLocator); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.AddModuleServicesWasCalled); }
public void RegisterGlobalServicesRegistersIFindCustomerService() { TestableModuleInitializer module = new TestableModuleInitializer(); MockServiceCollection serviceCollection = new MockServiceCollection(); module.TestAddGlobalServices(serviceCollection); Assert.IsTrue(serviceCollection.RegistedServices.ContainsKey(typeof(IFindCustomerService))); }