Example #1
0
        public void TestSuiteFinished()
        {
            var suiteNode = CreateXmlNode("test-suite");

            _teamCity.TestSuiteFinished(suiteNode);

            Assert.That(_output.ToString(), Is.EqualTo(
                            "##teamcity[testSuiteFinished name='NAME']" + NL));
        }
Example #2
0
        public void OnTestEvent(string report)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(report);
            XmlNode testEvent = doc.FirstChild;

            switch (testEvent.Name)
            {
            case "start-test":
                if (_teamCity != null)
                {
                    _teamCity.TestStarted(testEvent);
                }
                break;

            case "test-case":
                TestFinished(testEvent);
                break;

            case "start-suite":
                if (_teamCity != null)
                {
                    _teamCity.TestSuiteStarted(testEvent);
                }
                break;

            case "test-suite":
                if (_teamCity != null)
                {
                    _teamCity.TestSuiteFinished(testEvent);
                }
                break;

            case "start-run":
                break;
            }
        }