Пример #1
0
        public void IsDirectory_WhenItIsAFile_ShouldReturnFalse()
        {
            // Arrange
            var path = XmlPathUtility.GetTestXmlPath("Organon.ExceptionHandling.AspNetCore.Tests.unittest.xml");

            // Act
            var result = _fileSystemManager.IsDirectory(path);

            // Assert
            Assert.IsFalse(result);
        }
        public void ParseXml()
        {
            // Arrange
            string path = XmlPathUtility.GetTestXmlPath("MSTest.xml");
            MsTestResultsParser testResultsParser = new MsTestResultsParser();

            // Act
            TestRun testRun = testResultsParser.ParseXml(path);

            // Assert
            AssertTestRun(testRun, 12, 4, 6, 2, "Failed", false, "BoraA@DT167 2018-09-23 19:48:07");
        }
Пример #3
0
        public void ParseXml()
        {
            // Arrange
            string path = XmlPathUtility.GetTestXmlPath("XUnit2.xml");
            XUnit2TestResultsParser testResultsParser = new XUnit2TestResultsParser();

            // Act
            TestRun testRun = testResultsParser.ParseXml(path);

            // Assert
            AssertTestRun(testRun, 12, 4, 6, 2, "Failed", false, "XUnit 09/23/2018 19:57:53");
        }
Пример #4
0
        public void EnumerateFiles_ShouldSearchFilesByExactName()
        {
            // Arrange
            string testXmlPath = XmlPathUtility.GetTestXmlPath("1.directorytest.xml");

            // Act
            IList <string> files = _fileSystemManager.EnumerateFiles(testXmlPath).ToList();

            // Assert
            Assert.AreEqual(1, files.Count);
            Assert.AreEqual(true, files.Contains(XmlPathUtility.GetTestXmlPath("1.directorytest.xml")));
        }
Пример #5
0
        public void ParseXml()
        {
            // Arrange
            string path = XmlPathUtility.GetTestXmlPath("Organon.ExceptionHandling.AspNetCore.Tests.unittest.xml");
            NUnitTestResultsParser testResultsParser = new NUnitTestResultsParser();

            // Act
            TestRun testRun = testResultsParser.ParseXml(path);

            // Assert
            AssertTestRun(testRun, 9, 8, 1, 0, "Failed", false, "2");
        }