public void LoadCallsRegisterSiteMapInformation() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew <TestableRootCompositionContainer>("TEST"); TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); ISiteMapBuilderService siteMapBuilder = new MockSiteMapBuilderService(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add <IHttpContextLocatorService>(contextLocator); container.Services.Add <ISiteMapBuilderService>(siteMapBuilder); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.RegisterSiteMapWasCalled); }
public void LoadCallsRegisterSiteMapInformation() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew<TestableRootCompositionContainer>("TEST"); TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); ISiteMapBuilderService siteMapBuilder = new MockSiteMapBuilderService(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add<IHttpContextLocatorService>(contextLocator); container.Services.Add<ISiteMapBuilderService>(siteMapBuilder); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.RegisterSiteMapWasCalled); }