Ejemplo n.º 1
0
 public static void Serialize(XmlTestBatch instance, string outputFileName)
 {
     using (StreamWriter sw = new StreamWriter(outputFileName))
     {
         using (XmlTextWriter xw = new XmlTextWriter(sw))
         {
             xw.Formatting = Formatting.Indented;
             TestBatchSerializer.Serialize(xw, instance);
         }
     }
 }
Ejemplo n.º 2
0
 public static void Serialize(XmlTestBatch instance, string outputFileName)
 {
     using (StreamWriter sw = new StreamWriter(outputFileName))
     {
         using (XmlTextWriter xw = new XmlTextWriter(sw))
         {
             xw.Formatting = Formatting.Indented;
             TestBatchSerializer.Serialize(xw, instance);
         }
     }
 }
        public XmlTestBatchSearcher(XmlTestBatch testBatch)
        {
            this.testBatch = testBatch;

            foreach (XmlTestAssembly testAssembly in this.testBatch.TestAssemblies)
            {
                foreach (XmlFixture fixture in testAssembly.Fixtures)
                {
                    this.fixtures[fixture.Name]=fixture;
                    foreach (XmlTestCase testCase in fixture.TestCases)
                    {
                        string testName = testCase.GetFullName(fixture);
                        if (this.testCases.ContainsKey(testName))
                            Console.WriteLine("Warning: duplicate test {0}", testName);
                        else
                            this.testCases.Add(testName,testCase);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public XmlTestBatchSearcher(XmlTestBatch testBatch)
        {
            this.testBatch = testBatch;

            foreach (XmlTestAssembly testAssembly in this.testBatch.TestAssemblies)
            {
                foreach (XmlFixture fixture in testAssembly.Fixtures)
                {
                    this.fixtures[fixture.Name] = fixture;
                    foreach (XmlTestCase testCase in fixture.TestCases)
                    {
                        string testName = testCase.GetFullName(fixture);
                        if (this.testCases.ContainsKey(testName))
                        {
                            Console.WriteLine("Warning: duplicate test {0}", testName);
                        }
                        else
                        {
                            this.testCases.Add(testName, testCase);
                        }
                    }
                }
            }
        }
 public FailureFilter(XmlTestBatch testBatch)
 {
     if (testBatch == null)
         throw new ArgumentNullException("testBatch");
     this.searcher = new XmlTestBatchSearcher(testBatch);
 }
 public void SetPreviousTestBatch(XmlTestBatch testBatch)
 {
     if (testBatch == null)
         throw new ArgumentNullException("testBatch");
     this.testBatchSearcher = new XmlTestBatchSearcher(testBatch);
 }