Exemplo n.º 1
0
//		[Test]
        public void SetUpAndTearDownAreCalled()
        {
            TestSuite suite = new LegacySuite(typeof(LegacySuiteWithSetUpAndTearDown));

            suite.Run(NullListener.NULL);
            LegacySuiteWithSetUpAndTearDown fixture = (LegacySuiteWithSetUpAndTearDown)suite.Fixture;

            Assert.AreEqual(1, fixture.setupCount);
            Assert.AreEqual(1, fixture.teardownCount);
        }
        public void SetUpAndTearDownAreCalled()
        {
            setupCount = teardownCount = 0;
            TestSuite suite = new LegacySuite(typeof(LegacySuiteWithSetUpAndTearDown));

            Assert.AreEqual(RunState.Runnable, suite.RunState);
            suite.Run(NullListener.NULL);
            Assert.AreEqual(1, setupCount);
            Assert.AreEqual(1, teardownCount);
        }