Rev | Line | |
---|
[4476] | 1 | using System;
|
---|
| 2 | using System.Text;
|
---|
| 3 | using System.Collections.Generic;
|
---|
| 4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
| 5 | using Microsoft.Practices.CompositeWeb;
|
---|
| 6 | using Microsoft.Practices.CompositeWeb.Services;
|
---|
| 7 | using Microsoft.Practices.CompositeWeb.Interfaces;
|
---|
| 8 |
|
---|
| 9 | namespace 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.