public async Task Generate_ShouldHaveOneFailTestForDivisionNotDeclared() { var methods = new CalculatorSnapshotMethods() { Addition = true, Division = false, Multiplication = true, Subtraction = true, }.GetMethods(); var results = await Generator.GenerateResults(Data, MockSnapshots.GetLastCalculatorSnpahostName(), Assignment, methods); Assert.AreEqual(1, results.Count(r => !r.Passed)); }
public async Task Generate_ShouldReturnSameNumberOfTestsAsTestProject() { var methods = new CalculatorSnapshotMethods() { Addition = true, Division = true, Multiplication = true, Subtraction = true, }.GetMethods(); var results = await Generator.GenerateResults(Data, MockSnapshots.GetLastCalculatorSnpahostName(), Assignment, methods); Assert.AreEqual(Assignment.TestProject.UnitTests.Count, results.Count); }
public async Task Generate_ShouldReturnPassedForAllTests() { var methods = new CalculatorSnapshotMethods() { Addition = true, Division = true, Multiplication = true, Subtraction = true, }.GetMethods(); var results = await Generator.GenerateResults(Data, MockSnapshots.GetLastCalculatorSnpahostName(), Assignment, methods); foreach (var result in results) { Assert.IsTrue(result.Passed); } }