static void BuildTestCaseNodes(string testRunTime, Results contextResults, Context context) { foreach (var specification in context.Specification) { var specResult = new TestCase {Name = specification.Name, Executed = true, Time = testRunTime}; if(specification.Status == "passed") { specResult.Result = "Success"; specResult.Success = true; specResult.Asserts = 1; } else { specResult.Result = "Failure"; specResult.Success = false; specResult.Asserts = 0; } contextResults.TestCases.Add(specResult); } }
public void Add(TestCase item) { TestCases.Add(item); }