public void TestSpecificLineCoverage(int a, int b, int c, string returnLine) { ITriangleClassification tc = new TriangleClassificationImpl(); ExecutionTracer.Reset(); ObjectiveRecorder.Reset(true); Assert.Equal(0, ExecutionTracer.GetNumberOfObjectives()); Assert.Empty(ObjectiveRecorder.AllTargets); tc.Classify(a, b, c); Assert.Contains(returnLine, ObjectiveRecorder.AllTargets); }
public void TestLastLineCoverage(int a, int b, int c) { ITriangleClassification tc = new TriangleClassificationImpl(); ExecutionTracer.Reset(); ObjectiveRecorder.Reset(true); Assert.Equal(0, ExecutionTracer.GetNumberOfObjectives()); Assert.Empty(ObjectiveRecorder.AllTargets); tc.Classify(a, b, c); //assert that the last line of the method is reached Assert.Contains("Line_at_TriangleClassificationImpl_00027", ObjectiveRecorder.AllTargets); }