Exemplo n.º 1
0
        public void Test_ShouldStillCreateInstance_OnErrorParsingXml()
        {
            // Arrange
            var xml = "<invalid xml></format>";

            // Act
            var instance = TestCaseExecution.FromXml(xml);

            // Assert
            instance.ShouldNotBeNull();
            instance.Error.ShouldNotBeNull();
        }
Exemplo n.º 2
0
        private IEnumerable <TestCaseExecution> GetTestCaseExecutions(string testCaseName)
        {
            var result         = new List <TestCaseExecution>();
            var executionsPath = Path.Combine(this.path, testCaseName, "Executions");
            var executionFiles = this.fileSystemRepository.FetchAllFiles(executionsPath);

            foreach (var execution in executionFiles)
            {
                var tce = TestCaseExecution.FromXml(execution.Contents);
                tce.CreatedDateTime = execution.CreatedDateTime;
                tce.Name            = Path.GetFileNameWithoutExtension(execution.Name);

                result.Add(tce);
            }

            return(result);
        }