public void SetUp()
        {
            mocks = new MockRepository();

            ISettingsStorageProviderV30 settingsProvider = mocks.StrictMock <ISettingsStorageProviderV30>();

            Expect.Call(settingsProvider.GetSetting("ProcessSingleLineBreaks")).Return("false").Repeat.Any();
            Expect.Call(settingsProvider.GetSetting("WikiTitle")).Return("Title").Repeat.Any();

            Collectors.SettingsProvider = settingsProvider;

            IPagesStorageProviderV30 pagesProvider = mocks.StrictMock <IPagesStorageProviderV30>();

            Collectors.PagesProviderCollector = new ProviderCollector <IPagesStorageProviderV30>();
            Collectors.PagesProviderCollector.AddProvider(pagesProvider);

            Expect.Call(settingsProvider.GetSetting("DefaultPagesProvider")).Return(pagesProvider.GetType().FullName).Repeat.Any();

            PageInfo    page1        = new PageInfo("page1", pagesProvider, DateTime.Now);
            PageContent page1Content = new PageContent(page1, "Page 1", "User", DateTime.Now, "Comment", "Content", null, null);

            Expect.Call(pagesProvider.GetPage("page1")).Return(page1).Repeat.Any();
            Expect.Call(pagesProvider.GetContent(page1)).Return(page1Content).Repeat.Any();

            Expect.Call(pagesProvider.GetPage("page2")).Return(null).Repeat.Any();

            //Pages.Instance = new Pages();

            Host.Instance = new Host();

            Expect.Call(settingsProvider.GetSetting("CacheSize")).Return("100").Repeat.Any();
            Expect.Call(settingsProvider.GetSetting("CacheCutSize")).Return("20").Repeat.Any();

            Expect.Call(settingsProvider.GetSetting("DefaultCacheProvider")).Return(typeof(CacheProvider).FullName).Repeat.Any();

            // Cache needs setting to init
            mocks.Replay(settingsProvider);

            ICacheProviderV30 cacheProvider = new CacheProvider();

            cacheProvider.Init(Host.Instance, "");
            Collectors.CacheProviderCollector = new ProviderCollector <ICacheProviderV30>();
            Collectors.CacheProviderCollector.AddProvider(cacheProvider);

            mocks.Replay(pagesProvider);

            Collectors.FormatterProviderCollector = new ProviderCollector <IFormatterProviderV30>();

            //System.Web.UI.HtmlTextWriter writer = new System.Web.UI.HtmlTextWriter(new System.IO.StreamWriter(new System.IO.MemoryStream()));
            //System.Web.Hosting.SimpleWorkerRequest request = new System.Web.Hosting.SimpleWorkerRequest("Default.aspx", "?Page=MainPage", writer);
            System.Web.HttpContext.Current = new System.Web.HttpContext(new DummyRequest());
        }