Пример #1
0
 public void FailuresPropagateToSuite()
 {
     TestSuite suite = CreateSimpleSuite("my suite");
     DummyTestCase dummy = new DummyTestCase();
     suite.AddTest(new TestCase( "TheTest", dummy) );
     dummy.simulateTestFailure = true;
     TestResult result = suite.Run();
     Assert.That( result.ResultState, Is.EqualTo( ResultState.Failure ) );
 }
Пример #2
0
        public void ErrorsPropagateToSuiteAsFailures()
        {
            TestSuite     suite = CreateSimpleSuite("my suite");
            DummyTestCase dummy = new DummyTestCase();

            suite.AddTest(new TestCase("TheTest", dummy));
            dummy.simulateTestError = true;
            TestResult result = suite.Run();

            Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure));
        }
Пример #3
0
        public DummyTestSuite(string recipe)
            : base("Dummy")
        {
            foreach (char c in recipe)
            {
                DummyTestCase test = new DummyTestCase();

                switch (c)
                {
                    case 'E':
                        test.simulateTestError = true;
                        break;
                    case 'F':
                        test.simulateTestFailure = true;
                        break;
                    default:
                        break;
                }

                this.AddTest(new TestCase( "TheTest", test ));
            }
        }
Пример #4
0
        public DummyTestSuite(string recipe)
            : base("Dummy")
        {
            foreach (char c in recipe)
            {
                DummyTestCase test = new DummyTestCase("TheTest");

                switch (c)
                {
                case 'E':
                    test.simulateTestError = true;
                    break;

                case 'F':
                    test.simulateTestFailure = true;
                    break;

                default:
                    break;
                }

                this.AddTest(test);
            }
        }
Пример #5
0
 public void SetUp()
 {
     dummy = new DummyTestCase();
     test = new TestCase("TheTest", dummy);
 }
Пример #6
0
 public void SetUp()
 {
     dummy = new DummyTestCase();
     test  = new TestCase("TheTest", dummy);
 }
 protected override void SetUp()
 {
     test = new DummyTestCase( "TheTest" );
 }
Пример #8
0
 protected override void SetUp()
 {
     test = new DummyTestCase("TheTest");
 }