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; }
internal MockContentStore(MockSetupOptions options) : base(null) { _options = options; }
internal static NamespaceManager CreateMockStore(Federation federation, string ns, MockSetupOptions options, NamespaceProviderParameterCollection parameters) { MockContentStore store = new MockContentStore(options); return federation.RegisterNamespace(store, ns, parameters); }
internal static NamespaceManager CreateMockStore(Federation federation, string ns, MockSetupOptions options) { return CreateMockStore(federation, ns, options, null); }
internal static Federation SetupFederation(string siteUrl, TestContentSet content, MockSetupOptions options) { return SetupFederation(siteUrl, content, options, new FederationConfiguration()); }