コード例 #1
0
ファイル: FederationTests.cs プロジェクト: nuxleus/flexwiki
        public void RegisterNamespace()
        {
            MockWikiApplication application = new MockWikiApplication(
                new FederationConfiguration(),
                new LinkMaker("test://federationtests"),
                OutputFormat.HTML,
                new MockTimeProvider(TimeSpan.FromSeconds(1))); 

            Federation federation = new Federation(application);
            MockContentStore store = new MockContentStore();
            NamespaceManager storeManager = federation.RegisterNamespace(store, "MockStore");

            Assert.IsNotNull(storeManager, "Checking that a NamespaceManager was created.");
            Assert.AreSame(storeManager, store.NamespaceManager,
              "Checking that the MockContentStore is at the end of the content store chain.");
        }
コード例 #2
0
ファイル: WikiTestUtilities.cs プロジェクト: nuxleus/flexwiki
 internal static NamespaceManager CreateMockStore(Federation federation, string ns, 
     MockSetupOptions options, NamespaceProviderParameterCollection parameters)
 {
     MockContentStore store = new MockContentStore(options);
     return federation.RegisterNamespace(store, ns, parameters);
 }