A developer is writing unit tests for the following method: public static Boolean isFreezing(String celsiusTemp){ if(String.isNotBlank(celsiusTemp) && celsiusTemp.isNumeric()) { return Decimal.valueof(celsiusTemp) <= 0; } return null; } Which assertion would be used in a negative test case?
A. System.assertEquals(true, isFreezing(null))
B. System.assertEquals (true, isFreezing('0')
C. System.assertEquals(null, isFreezing('asdf'))
D. System.assertEquals(true, isFreezing('IOO'))
Suggest answer: C
Reference:
No comments:
Please share to make the community better.