public void Parse() { // Arrange string xml = XmlPathUtility.GetTestXmlContent("XUnit2.xml"); // Act TestRun testRun = XUnit2TestResultsParser.Parse(XDocument.Parse(xml)); // Assert AssertTestRun(testRun, 12, 4, 6, 2, "Failed", false, "XUnit 09/23/2018 19:57:53"); }
public void Parse() { // Arrange string xml = XmlPathUtility.GetTestXmlContent("MSTest.xml"); // Act TestRun testRun = MsTestResultsParser.Parse(XDocument.Parse(xml)); // Assert AssertTestRun(testRun, 12, 4, 6, 2, "Failed", false, "BoraA@DT167 2018-09-23 19:48:07"); }
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 IsDirectory_WhenItIsADirectory_ShouldReturnTrue() { // Arrange var path = XmlPathUtility.GetTestXmlFolderPath(); // Act var result = _fileSystemManager.IsDirectory(path); // Assert Assert.IsTrue(result); }
public void EnumerateFiles_WhenThereAre2FilesInDirectory_ShouldListHas2Items() { // Arrange var path = XmlPathUtility.GetTestXmlFolderPath(); // Act var fileList = _fileSystemManager.EnumerateFiles(path); // Assert Assert.AreEqual(2, fileList.Count()); }
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"); }
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"); }
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"))); }
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"); }
public void CreateOutputTemplateFactory_WhenThereAreMultipleFileInDirectory_ShouldReturnMultipleTestRunOutputTemplateFactory() { // Arrange var path = XmlPathUtility.GetTestXmlFolderPath(); _fileSystemManager = new DefaultFileSystemManager(); OutputTemplateManager outputTemplateManager = CreateOutputTemplateManager(path); // Act IOutputTemplateFactory factory = outputTemplateManager.CreateOutputTemplateFactory(); // Assert Assert.AreEqual(typeof(MultipleTestRunOutputTemplateFactory), factory.GetType()); }