Uses of Annotation Type
org.assertj.core.internal.annotation.Contract
Packages that use Contract
-
Uses of Contract in org.assertj.core.api
Methods in org.assertj.core.api with annotations of type ContractModifier and TypeMethodDescription<T> TAbstractSoftAssertions.fail()Fails with an empty message to be used in code like:<T> TFails with the given message.<T> TFails with the given message built likeString.format(String, Object...).<T> TFails with the given message and with theThrowablethat caused the failure.<T> TFails with theThrowablethat caused the failure and an empty message.static <T> TAssertions.fail()Throws anAssertionErrorwith an empty message to be used in code like:static <T> TThrows anAssertionErrorwith the given message.static <T> TThrows anAssertionErrorwith the given message built asString.format(String, Object...).static <T> TThrows anAssertionErrorwith the given message and with theThrowablethat caused the failure.static <T> TThrows anAssertionErrorwith theThrowablethat caused the failure and an empty message.static voidAssertionsForClassTypes.fail()Only delegate toFail.fail()so thatAssertionsoffers a full feature entry point to all Assertj features (but you can useFailif you prefer).static voidOnly delegate toFail.fail(String)so that Assertions offers a full feature entry point to all Assertj Assert features (but you can use Fail if you prefer).static voidOnly delegate toFail.fail(String, Throwable)so that Assertions offers a full feature entry point to all AssertJ features (but you can use Fail if you prefer).static voidOnly delegate toFail.fail(Throwable)so that Assertions offers a full feature entry point to all AssertJ features (but you can use Fail if you prefer).static <T> TBDDAssertions.fail()Throws anAssertionErrorwith an empty message to be used in code like:static <T> TThrows anAssertionErrorwith the given message.static <T> TThrows anAssertionErrorwith the given message built asString.format(String, Object...).static <T> TThrows anAssertionErrorwith the given message and with theThrowablethat caused the failure.static <T> TThrows anAssertionErrorwith theThrowablethat caused the failure.static <T> TFail.fail()Throws anAssertionErrorwith an empty message to be used in code like:static <T> TThrows anAssertionErrorwith the given message.static <T> TThrows anAssertionErrorwith the given message built asString.format(String, Object...).static <T> TThrows anAssertionErrorwith the given message and with theThrowablethat caused the failure.static <T> TThrows anAssertionErrorwith theThrowablethat caused the failure.static voidDeprecated.Throws anAssertionErrorwith the given message.static voidDeprecated.Throws anAssertionErrorwith the given message built asString.format(String, Object...).static voidDeprecated.Throws anAssertionErrorwith the given message and with theThrowablethat caused the failure.default <T> TWithAssertions.fail()Throws anAssertionErrorwith an empty message to be used in code like:default <T> TThrows anAssertionErrorwith the given message.default <T> TThrows anAssertionErrorwith the given message built asString.format(String, Object...).default <T> TThrows anAssertionErrorwith the given message and with theThrowablethat caused the failure.default <T> TThrows anAssertionErrorwith theThrowablethat caused the failure.voidAbstractSoftAssertions.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Fails with a message explaining that aThrowableof given class was expected to be thrown but had not been.static <T> TAssertions.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.static voidAssertionsForClassTypes.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Only delegate toFail.failBecauseExceptionWasNotThrown(Class)so that Assertions offers a full feature entry point to all AssertJ features (but you can use Fail if you prefer).static <T> TFail.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.static voidJava6Assertions.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Deprecated.Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.default <T> TWithAssertions.failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.protected voidAbstractAssert.failWithActualExpectedAndMessage(Object actual, Object expected, String errorMessageFormat, Object... arguments) Throw an assertion error based on information in this assertion.protected voidAbstractAssert.failWithMessage(String errorMessage, Object... arguments) Throw an assertion error based on information in this assertion.voidAbstractSoftAssertions.shouldHaveThrown(Class<? extends Throwable> throwableClass) Fails with a message explaining that aThrowableof given class was expected to be thrown but had not been.static <T> TAssertions.shouldHaveThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.static voidAssertionsForClassTypes.shouldHaveThrown(Class<? extends Throwable> throwableClass) Only delegate toFail.shouldHaveThrown(Class)so that Assertions offers a full feature entry point to all AssertJ features (but you can use Fail if you prefer).static <T> TBDDAssertions.shouldHaveThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.static <T> TFail.shouldHaveThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.static voidJava6Assertions.shouldHaveThrown(Class<? extends Throwable> throwableClass) Deprecated.Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.default <T> TWithAssertions.shouldHaveThrown(Class<? extends Throwable> throwableClass) Throws anAssertionErrorwith a message explaining that aThrowableof given class was expected to be thrown but had not been.