Câu 12: Salesforce Certified Platform Developer I
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. Which step should the developer take to resolve the issue and properly test the exception?
Nội dung câu hỏi
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. Which step should the developer take to resolve the issue and properly test the exception?
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. Use try/catch within the unit test to catch the exception. — đáp án hiện tại
- B. Use the finally bloc within the unit test to populate the exception.
- C. Use the database methods with all or none set to FALSE.
- D. Use Test.isRunningTest() within the custom controller.
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.