Beispiel #1
0
    public void SetUp()
    {
      // Get the base URL from the config file and gen up the web service endpoint
      string baseUrl = TestUtilities.BaseUrl;
      _rssUrl = baseUrl + "rss.aspx"; 

      // Back up the wiki configuration
      _oldWikiState = TestUtilities.BackupWikiState(); 

      // Recreate the wiki each time so we start from a known state. Otherwise, tests
      // that (for example) retrieve old versions might not get what they expect.
      _federation = TestUtilities.CreateFederation("TestFederation", _testContent); 
    }
Beispiel #2
0
		public virtual void Setup()
		{
			// Back up the wiki configuration
			OldWikiState = TestUtilities.BackupWikiState(); 

			// Recreate the wiki each time so we start from a known state
			string path = System.Guid.NewGuid().ToString();
			TheFederation = TestUtilities.CreateFederation(path, FederationContent); 

			// Establish a link maker
			TheLinkMaker = new LinkMaker(TestUtilities.BaseUrl);

			// And a browser
			TheBrowser = new Browser();
		}
Beispiel #3
0
    internal static void RestoreWikiState(WikiState state)
    {
      if (File.Exists(state.ConfigPath))
      {
        string configFilePath = TestUtilities.ReadConfigFilePath(); 
        if (File.Exists(configFilePath))
        {
          File.Delete(configFilePath);
        }

        File.Move(state.ConfigPath, configFilePath); 
      }
    }