4.3.5 Hands-on: Getting Mockito to run

Course subject(s) Module 4: Testability and Mock Objects

Look at classes in the invoicemocked package. It contains the same classes as the previous invoice example, but now, take a look at how the class is designed so that writing tests is just easier.

Tests are in the InvoiceFilterTest class of the invoicemocked package. Please notice how Mockito is being used there. Run the tests; they should be all green!

Creative Commons License
Automated Software Testing: Practical Skills for Java Developers by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/automated-software-testing-practical-skills-for-java-developers/.
Back to top