Custom Assertions with AssertJ   1. Overview In this tutorial, we’ll walk through creating custom AssertJ assertions; the AssertJ’s basics can be found here. Simply put, custom assertions allow creating assertions specific to our own classes, allowing our tests to better reflect the domain model. 2. Class Under Test Test… Continue Reading assertj-custom-assertion

AssertJ Exception Assertions 1. Overview In this quick tutorial, we’ll have a look at AssertJ’s exception-dedicated assertions. 2. Without AssertJ In order to test if an exception was thrown, we’d need to catch the exception and then perform assertions: try { // … } catch (Exception e) { // assertions… Continue Reading assertj-exception-assertion