Exemple #1
0
        public void SuiteStarted()
        {
            var suite = new FakeTestSuite(RUNNER_ID, TEST_ID, TEST_NAME, FULL_NAME);

            _eventAdapter.SuiteStarted(suite.TestName);
            string expected = string.Format("<start-suite id=\"{0}-{1}\" name=\"{2}\" fullname=\"{3}\"/>", RUNNER_ID, TEST_ID, TEST_NAME, FULL_NAME);

            Assert.That(_report, Is.EqualTo(expected));
        }
Exemple #2
0
        public void SuiteFinished()
        {
            var suite  = new FakeTestSuite(RUNNER_ID, TEST_ID, TEST_NAME, FULL_NAME, 1234);
            var result = new TestResult(suite);

            result.SetResult(ResultState.Failure, "Something failed!", null);
            result.AssertCount = 9999;
            result.Time        = 12.5;
            _eventAdapter.SuiteFinished(result);
            string expected = string.Format(
                "<test-suite type=\"TestSuite\" id=\"{0}-{1}\" name=\"{2}\" fullname=\"{3}\" runstate=\"Runnable\" testcasecount=\"1234\" result=\"Failed\" duration=\"12.500000\" total=\"1234\" passed=\"0\" failed=\"0\" inconclusive=\"0\" skipped=\"0\" asserts=\"9999\"><failure><message><![CDATA[Something failed!]]></message></failure></test-suite>",
                RUNNER_ID, TEST_ID, TEST_NAME, FULL_NAME);

            Assert.That(_report, Is.EqualTo(expected));
        }