Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/Administration.Tests/AdministrationModuleInitializerFixture.cs @ 4682

Last change on this file since 4682 was 4476, checked in by cfleisch, 14 years ago

Create repository (#1198)

File size: 1.3 KB
Line 
1using System;
2using System.Text;
3using System.Collections.Generic;
4using Microsoft.VisualStudio.TestTools.UnitTesting;
5using Microsoft.Practices.CompositeWeb;
6using Microsoft.Practices.CompositeWeb.Services;
7using Microsoft.Practices.CompositeWeb.Interfaces;
8
9namespace OKB.Administration.Tests
10{
11    /// <summary>
12    /// Summary description for AdministrationModuleInitializerFixture
13    /// </summary>
14    [TestClass]
15    public class AdministrationModuleInitializerFixture
16    {
17        public AdministrationModuleInitializerFixture()
18        {
19        }
20
21        [TestMethod]
22        public void AdministrationGetsRegisteredOnSiteMap()
23        {
24            TestableModuleInitializer moduleInitializer = new TestableModuleInitializer();
25            SiteMapBuilderService siteMapBuilder = new SiteMapBuilderService();
26
27            moduleInitializer.RegisterSiteMapInformation(siteMapBuilder);
28
29            SiteMapNodeInfo node = siteMapBuilder.GetChildren(siteMapBuilder.RootNode.Key)[0];
30            Assert.AreEqual("Administration", node.Key);
31        }
32
33    }
34
35    class TestableModuleInitializer : AdministrationModuleInitializer
36    {
37        public new void RegisterSiteMapInformation(ISiteMapBuilderService siteMapBuilder)
38        {
39            base.RegisterSiteMapInformation(siteMapBuilder);
40        }
41    }
42}
Note: See TracBrowser for help on using the repository browser.