示例#1
0
        internal static Federation SetupFederation(string siteUrl, TestContentSet content, MockSetupOptions options, 
            FederationConfiguration federationConfiguration)
        {
            LinkMaker linkMaker = new LinkMaker(siteUrl);
            MockWikiApplication application = new MockWikiApplication(
                federationConfiguration, 
                linkMaker, 
                OutputFormat.HTML, 
                new MockTimeProvider(TimeSpan.FromSeconds(1)));
            Federation federation = new Federation(application);

            foreach (TestNamespace ns in content.Namespaces)
            {
                NamespaceManager storeManager = CreateMockStore(federation, ns.Name, options, ns.Parameters);

                foreach (TestTopic topic in ns.Topics)
                {
                    WriteTestTopicAndNewVersion(storeManager, topic.Name, topic.Content, topic.Author);
                }
            }

            return federation;

        }
示例#2
0
 internal MockContentStore(MockSetupOptions options)
     : base(null)
 {
     _options = options;
 }
示例#3
0
 internal static NamespaceManager CreateMockStore(Federation federation, string ns, 
     MockSetupOptions options, NamespaceProviderParameterCollection parameters)
 {
     MockContentStore store = new MockContentStore(options);
     return federation.RegisterNamespace(store, ns, parameters);
 }
示例#4
0
 internal static NamespaceManager CreateMockStore(Federation federation, string ns, MockSetupOptions options)
 {
     return CreateMockStore(federation, ns, options, null); 
 }
示例#5
0
 internal static Federation SetupFederation(string siteUrl, TestContentSet content, MockSetupOptions options)
 {
     return SetupFederation(siteUrl, content, options, new FederationConfiguration()); 
 }