示例#1
0
        public static bool RunSingleTest(string baseUrl, TestInfo ti)
        {
            HtmlDiff wt = new HtmlDiff();

            wt.TestsBaseUrl   = baseUrl;
            wt.IgnoreListFile = _ignoreListFile;

            XmlDocument d1 = new XmlDocument();

            d1.Load(_outputPath + ti.Url.Replace("/", "_") + ".xml");

            XmlDocument d2 = wt.GetTestXml(ti);
            bool        fp = wt.XmlCompare(d1, d2, _disableAlmost);

            if (fp == false)
            {
                throw new Exception("Url: " + ti.Url + "\nCompare failed:\n" + wt.CompareStatus + "\n");
            }
            return(fp);
        }
示例#2
0
        static void CreateExpectedResults(string baseUrl)
        {
            TestsCatalog tc = new TestsCatalog(_catalogFile, _runExcluded);
            HtmlDiff     wt = new HtmlDiff();

            wt.TestsBaseUrl   = baseUrl;
            wt.IgnoreListFile = _ignoreListFile;

            if ((_outputPath != "") && (!Directory.Exists(_outputPath)))
            {
                Directory.CreateDirectory(_outputPath);
            }

            Console.WriteLine("Running expected results...");
            foreach (TestInfo ti in tc)
            {
                Console.WriteLine("Running...  " + ti.Url);
                XmlDocument d = wt.GetTestXml(ti);
                d.Save(_outputPath + ti.Url.Replace("/", "_") + ".xml");
            }
        }
示例#3
0
文件: Harness.cs 项目: nobled/mono
		public static bool RunSingleTest(string baseUrl, TestInfo ti)
		{
			HtmlDiff wt = new HtmlDiff();
			wt.TestsBaseUrl = baseUrl;
			wt.IgnoreListFile = _ignoreListFile;

			XmlDocument d1 = new XmlDocument();
			d1.Load(_outputPath + ti.Url.Replace("/", "_") + ".xml");
			
			XmlDocument d2 = wt.GetTestXml( ti );
			bool fp = wt.XmlCompare(d1, d2, _disableAlmost);
			if (fp == false) {
				throw new Exception("Url: " + ti.Url + "\nCompare failed:\n" + wt.CompareStatus + "\n");
			}
			return fp;
		}
示例#4
0
文件: Harness.cs 项目: nobled/mono
		static void CreateExpectedResults(string baseUrl)
		{
			TestsCatalog tc = new TestsCatalog(_catalogFile, _runExcluded);
			HtmlDiff wt = new HtmlDiff();
			wt.TestsBaseUrl = baseUrl;
			wt.IgnoreListFile = _ignoreListFile;

			if ((_outputPath != "") && (!Directory.Exists(_outputPath)))
			{
				Directory.CreateDirectory(_outputPath);
			}

			Console.WriteLine("Running expected results...");
			foreach (TestInfo ti in tc)
			{
				Console.WriteLine("Running...  " + ti.Url);
				XmlDocument d = wt.GetTestXml( ti );
				d.Save(_outputPath + ti.Url.Replace("/", "_") + ".xml");
			}
		}