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); }
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); }
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); }