/** * Not a really relevant assertion, the goal is to show how to write a new assertion with a * specific error message that honors the description set by the assertion user. */ public ConcreteAssert checkNull() { // set a specific error message WritableAssertionInfo info = getWritableAssertionInfo(); info.overridingErrorMessage("specific error message"); Objects.instance().assertNull(info, actual); // return the current assertion for method chaining return this; }
@Override protected void verify_internal_effects() { assertThat(Objects.instance()).isSameAs(getObjects(assertions)); assertThat(Doubles.instance()).isSameAs(getDoubles(assertions)); }
@Override protected void verify_internal_effects() { assertThat(Objects.instance()).isSameAs(getObjects(assertions)); assertThat(arraysBefore).isSameAs(getArrays(assertions)); }