public void Add(Assembly assembly) { Assembly.Add(assembly); }
int GetAssemblySpecificationCount(Assembly assembly) { return assembly.Concern.SelectMany(concern => concern.Context).Sum( context => (from spec in context.Specification select spec).Count()); }
int GetAssemblySpecificationFailures(Assembly assembly) { return assembly.Concern.Sum(concern => GetConsernSpecificationFailures(concern)); }
void BuildTestSuiteNameSpaceNodes(string testRunTime, Results assemblyResults, Assembly assembly) { foreach (var concern in assembly.Concern) { var concernSuite = new TestSuite {TestSuiteType = "NameSpace", Name = concern.Name, Executed = true}; if (GetConsernSpecificationFailures(concern) == 0) { concernSuite.Result = "Success"; concernSuite.Success = true; } else { concernSuite.Result = "Failure"; concernSuite.Success = false; } concernSuite.Time = testRunTime; assemblyResults.TestSuite = concernSuite; var concernResults = new Results(); concernSuite.Results = concernResults; BuildTestSuiteTestFixtureNodes(testRunTime, concernResults, concern); } }