ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 198 - Certified Development Lifecycle and Deployment Architect discussion

Report
Export

A developer on the Universal Containers team has written a test class to test a method that involves a web service callout. Within the test class, the developer is supposed to load test data, create an instance of the Mock object, set the Test.setMock() to that Mock object, call startTest(), execute the code that makes the callout, call stopTest(), and compare the result with expectations. Unfortunately, the Developer forgot to use the Test.setMock() method step.

What would happen when the developer runs this test class?

A.
The test class fails without error message since the test class will simply skip the web service callout during the execution.
Answers
A.
The test class fails without error message since the test class will simply skip the web service callout during the execution.
B.
The test class fails and the developer will see a message stating: Methods defined as TestMethod do not support Web service callouts.
Answers
B.
The test class fails and the developer will see a message stating: Methods defined as TestMethod do not support Web service callouts.
C.
The test class would make the web service callout and may or may not fail depending on the circumstances on the web service end
Answers
C.
The test class would make the web service callout and may or may not fail depending on the circumstances on the web service end
D.
It is impossible to miss the Test.setMock() statement, the Developer Console will not let the developer save it since the test methou callout
Answers
D.
It is impossible to miss the Test.setMock() statement, the Developer Console will not let the developer save it since the test methou callout
Suggested answer: B
asked 23/09/2024
Ruggero Pozza
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first