Câu 104: Certified Platform Developer II
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?
Nội dung câu hỏi
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?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. System.assertEquals(true, isFreezing(null))
- B. System.assertEquals (true, isFreezing('0')
- C. System.assertEquals(null, isFreezing('asdf')) — đáp án hiện tại
- D. System.assertEquals(true, isFreezing('IOO'))
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.