trailhead-code-samples icon indicating copy to clipboard operation
trailhead-code-samples copied to clipboard

wrong code format on if( date2 < date1) { return false; } causes wrong test coverage in VerifyDate

Open junliu724515 opened this issue 4 years ago • 1 comments

I did not test the condition if( date2 < date1) { return false; } on line 16, but I still got 100% test coverage on VerifyDate class

it was caused by the "return false" statement being on the same line of if statement, so even without testing this condition, It was still 100%

junliu724515 avatar May 11 '21 01:05 junliu724515

Can someone share the test class file for my practice. I am not able to write the test class for this code.

ChutkeAAkshitha avatar Mar 01 '23 10:03 ChutkeAAkshitha