1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to Testing in Java

Connected

练习

Unit test: Database message

Consider the ErrorStore and InfoStore from the lesson. Suppose the process(String message) method is used on a [WARN] message, which means it would end up in neither database. Write a test to verify that.

说明

100 XP
  • Verify the message did not end up in infoStore.
  • Verify it also did not end up in errorStore using the times() verify approach.
  • In that same statement, add the database method, save(), that wasn't called.