1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Introduction to Testing in Java

Connected

अभ्यास

Unit test: Database with a list

Consider the ErrorStore and InfoStore from the lesson, but now our process() method is accepting a list of messages. Given the input list provided, verify each database was called the correct number of times.

निर्देश

100 XP
  • Create a mock for the InfoStore.
  • Create a mock for the ErrorStore.
  • Verify how many times the InfoStore mock will be called with the current arguments.
  • Verify how many times the ErrorStore mock will be called with the current arguments.