Writing Failsafe Code: Unit Tests in C# Step-by-Step by Shreeharsh Ambli

Writing Failsafe Code: Unit Tests in C# Step-by-Step by Shreeharsh Ambli

Author:Shreeharsh Ambli [Ambli, Shreeharsh]
Language: eng
Format: epub
Published: 2017-04-04T07:00:00+00:00


Let’s rerun the code coverage tool and see what we have achieved till now:

Thanks to that one unit test method, we are now down to about 56% from over 71% code that’s not covered by unit tests. Let’s continue to dig deeper in the report and see who the next big culprit is:

The highlighted line refers to this code in our example:

public static ComplexNumber operator +(ComplexNumber firstNumber, ComplexNumber secondNumber)

{

return new ComplexNumber(firstNumber.RealPart + secondNumber.RealPart,

firstNumber.ImaginaryPart + secondNumber.ImaginaryPart);

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.