예제 #1
0
        public void AfterTestCase(ITestCase test)
        {
            if (this.TestBatchSearcher != null)
            {
                XmlTestCase previous = this.TestBatchSearcher.GetTestCase(this.currentFixture, this.currentTest);
                if (previous == null)
                {
                    this.currentTest.History = XmlTestHistory.New;
                }
                else
                {
                    if (
                        this.currentTest.State == TestState.Success &&
                        previous.State != TestState.Success)
                    {
                        this.currentTest.History = XmlTestHistory.Fixed;
                    }
                    else if (
                        this.currentTest.State == TestState.Failure &&
                        previous.State != TestState.Failure
                        )
                    {
                        this.currentTest.History = XmlTestHistory.Failure;
                    }
                }
            }

            if (!this.ShowTestCaseOnSuccess && this.currentTest.State == TestState.Success)
            {
                this.currentTest.SetUp    = null;
                this.currentTest.Test     = null;
                this.currentTest.TearDown = null;
            }
            this.currentTest = null;
        }
예제 #2
0
 public void BeforeTestCase(ITestCase test)
 {
     this.currentTest = new XmlTestCase(String.Format("{0}t{1}",
                                                      this.currentFixture.ID,
                                                      this.currentFixture.TestCases.Count),
                                        test.Name);
     this.currentFixture.TestCases.Add(this.currentTest);
 }
예제 #3
0
        public bool Filter(IFixture fixture, ITestCase testCase)
        {
            XmlTestCase xtestCase = this.Searcher.GetTestCase(fixture.Name, testCase.Name);

            if (xtestCase == null)
            {
                return(false);
            }
            else
            {
                return(xtestCase.State == TestState.Failure);
            }
        }