Salesforce
PDII · Question #93
PDII Question #93: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #93. The question stem and answer options stay visible for context.
Question
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?
Options
- ASystem.assertEquals(true, isFreezing(null))
- BSystem.assertEquals (true, isFreezing('0')
- CSystem.assertEquals(null, isFreezing('asdf'))
- DSystem.assertEquals(true, isFreezing('IOO'))
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.