March 2015
Intermediate to advanced
236 pages
5h 26m
English
In the last chapter we worked through a meaty example of writing unit tests against an existing bit of code. You learned how to use assertions to express expected outcomes.
In this chapter you’ll learn many additional ways to phrase asserts in JUnit by using a library known as Hamcrest. You’ll also learn how to write tests when you’re expecting exceptions.
Read now
Unlock full access