Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
Define mocking in the context of unit testing.
Think about the purpose of replacing real components.
What is the purpose of the @Mock annotation in Mockito?
Recall how we indicate a mock object in the code.
What framework is commonly used for mocking in Java?
Consider which tool specializes in mocking.
True or False: Mocking allows tests to use real implementations of dependencies.
Think about the function of mocks.
Create a unit test using Mockito for a service that requires two dependencies and verify that both dependencies are called correctly during the test.
Ensure to isolate each dependency in your test.
Discuss the implications of using mocks excessively in your testing strategy. What could potentially go wrong?
Think about the relationship between mocks and the actual behavior of the system.
5 more questions in this section. Enroll free to practise them all.
Enroll free