open navigation menu
AiFolder
Tools for a smarter you
Discover
Tools
AI
Games
Interviews
Blog
More
Search AiFolder
Toggle theme
Toggle theme
Sign in
Exit
00:00
Submit test
Unit Testing · Intermediate
10 questions · Question 1 of 10
10%
Multiple Choice
Mid
When and where should I use Mocking?
A
Rule of thumb: If the function you are testing needs a complicated object as a parameter, and it would be a pain to simply instantiate this object (if, for example, it tries to establish a TCP connection), use a mock.
B
Code coverage is great, but functionality coverage is even better.
C
If you want to unit test a private method, something may be wrong.
D
Mocking is primarily used in unit testing.
Previous
Next