using System; using System.Text; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.Practices.CompositeWeb; using Microsoft.Practices.CompositeWeb.Services; using Microsoft.Practices.CompositeWeb.Interfaces; namespace OKB.Administration.Tests { /// /// Summary description for AdministrationModuleInitializerFixture /// [TestClass] public class AdministrationModuleInitializerFixture { public AdministrationModuleInitializerFixture() { } [TestMethod] public void AdministrationGetsRegisteredOnSiteMap() { TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); SiteMapBuilderService siteMapBuilder = new SiteMapBuilderService(); moduleInitializer.RegisterSiteMapInformation(siteMapBuilder); SiteMapNodeInfo node = siteMapBuilder.GetChildren(siteMapBuilder.RootNode.Key)[0]; Assert.AreEqual("Administration", node.Key); } } class TestableModuleInitializer : AdministrationModuleInitializer { public new void RegisterSiteMapInformation(ISiteMapBuilderService siteMapBuilder) { base.RegisterSiteMapInformation(siteMapBuilder); } } }