Пример #1
0
        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
 internal static NamespaceManager CreateMockStore(Federation federation, string ns, 
     MockSetupOptions options, NamespaceProviderParameterCollection parameters)
 {
     MockContentStore store = new MockContentStore(options);
     return federation.RegisterNamespace(store, ns, parameters);
 }