ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 142 - Certified Development Lifecycle and Deployment Architect discussion

Report
Export

Which two statements are accurate about why Mock objects are needed when writing test classes?

Choose 2 answers

A.
Mock can also be used on the classes that extend the batchable interface to bypass the batch jobs.
Answers
A.
Mock can also be used on the classes that extend the batchable interface to bypass the batch jobs.
B.
Using a Mock allows the test class to bypass the dependencies of other objects, methods, state, or behaviors. Therefore, the developer has total control of his own code.
Answers
B.
Using a Mock allows the test class to bypass the dependencies of other objects, methods, state, or behaviors. Therefore, the developer has total control of his own code.
C.
Some methods are invoking long running processes, using Mock is a shortcut of bypassing the long executions.
Answers
C.
Some methods are invoking long running processes, using Mock is a shortcut of bypassing the long executions.
D.
A Mock is needed whenever the code makes an HTTP callout.
Answers
D.
A Mock is needed whenever the code makes an HTTP callout.
Suggested answer: B, D
asked 23/09/2024
Zdenek Machura
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first