예제 #1
0
        public void FindNumberOfErrorsShouldReturnOneError()
        {
            var     testSuite = new TestSuite();
            TestRun testRun   = new ArkadeTestMock("test with error", TestType.ContentAnalysis).GetTestRun();

            testRun.Add(new TestResult(ResultType.Error, new Location(""), "feil"));
            testSuite.AddTestRun(testRun);

            testSuite.FindNumberOfErrors().Should().Be(1);
        }
예제 #2
0
        public TestRun Build()
        {
            TestRun testRun = new ArkadeTestMock(_testId, _testName, _testType, _testDescription).GetTestRun();

            testRun.TestDuration = _durationMillis;

            if (_testResults.Count == 0)
            {
                _testResults.Add(new TestResult(ResultType.Success, new Location("location"), "message"));
            }
            testRun.Results = _testResults;

            return(testRun);
        }
예제 #3
0
        private static TestSuite CreateTestSuite(params TestResult[] testResults)
        {
            var     testSuite = new TestSuite();
            TestRun testRun   = new ArkadeTestMock("test with error", TestType.ContentAnalysis).GetTestRun();

            if (testResults != null)
            {
                foreach (var testResult in testResults)
                {
                    testRun.Add(testResult);
                }
            }
            testSuite.AddTestRun(testRun);
            return(testSuite);
        }