private static IEnumerable <ImplementationResult> GetIncorrectImplementationResults( ITestRunner testRunner, IEnumerable <Type> implementations) { var implTypeToTestsType = IncorrectImplementationHelper.GetTests() .ToDictionary(it => it.CreateTasks().GetType(), it => it.GetType()); foreach (var implementation in implementations) { var failed = GetFailedTests(testRunner, implementation, implTypeToTestsType[implementation]).ToArray(); yield return(new ImplementationResult(implementation.Name, failed)); } }
public void CheckAllTestsAreInPlace() { var implTypes = IncorrectImplementationHelper.GetTypes(); var testedImpls = IncorrectImplementationHelper.GetTests() .Select(it => it.CreateTasks()) .ToArray(); foreach (var impl in implTypes) { Assert.NotNull(testedImpls.SingleOrDefault(it => it.GetType().FullName == impl.FullName), "Single implementation of tests for {0} not found. Regenerate tests with test above!", impl.FullName); } }