Uses of Annotation Interface
org.junit.platform.commons.annotation.Contract
Packages that use Contract
Package
Description
JUnit Jupiter API for writing tests.
Common support APIs provided by the JUnit Platform.
Internal common utilities for JUnit.
- 
Uses of Contract in org.junit.jupiter.apiMethods in org.junit.jupiter.api with annotations of type ContractModifier and TypeMethodDescriptionstatic <V> VAssumptions.abort()Abort the test without a message.static <V> VAbort the test with the givenmessage.static <V> VAbort the test with the supplied message.static voidAssertions.assertFalse(boolean condition) Assert that the suppliedconditionisfalse.static voidAssertions.assertFalse(boolean condition, @Nullable String message) Assert that the suppliedconditionisfalse.static voidAssertions.assertFalse(boolean condition, Supplier<@Nullable String> messageSupplier) Assert that the suppliedconditionisfalse.static <T> TAssertions.assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue) Assert that the suppliedactualValueis an instance of theexpectedType.static <T> TAssertions.assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, @Nullable String message) Assert that the suppliedactualValueis an instance of theexpectedType.static <T> TAssertions.assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, Supplier<@Nullable String> messageSupplier) Assert that the suppliedactualValueis an instance of theexpectedType.static voidAssertions.assertNotNull(@Nullable Object actual) Assert thatactualis notnull.static voidAssertions.assertNotNull(@Nullable Object actual, @Nullable String message) Assert thatactualis notnull.static voidAssertions.assertNotNull(@Nullable Object actual, Supplier<@Nullable String> messageSupplier) Assert thatactualis notnull.static voidAssertions.assertNull(@Nullable Object actual) Assert thatactualisnull.static voidAssertions.assertNull(@Nullable Object actual, @Nullable String message) Assert thatactualisnull.static voidAssertions.assertNull(@Nullable Object actual, Supplier<@Nullable String> messageSupplier) Assert thatactualisnull.static voidAssertions.assertTrue(boolean condition) Assert that the suppliedconditionistrue.static voidAssertions.assertTrue(boolean condition, @Nullable String message) Assert that the suppliedconditionistrue.static voidAssertions.assertTrue(boolean condition, Supplier<@Nullable String> messageSupplier) Assert that the suppliedconditionistrue.static voidAssumptions.assumeFalse(boolean assumption) Validate the given assumption.static voidAssumptions.assumeFalse(boolean assumption, @Nullable String message) Validate the given assumption.static voidAssumptions.assumeFalse(boolean assumption, Supplier<@Nullable String> messageSupplier) Validate the given assumption.static voidAssumptions.assumeTrue(boolean assumption) Validate the given assumption.static voidAssumptions.assumeTrue(boolean assumption, @Nullable String message) Validate the given assumption.static voidAssumptions.assumeTrue(boolean assumption, Supplier<@Nullable String> messageSupplier) Validate the given assumption.static <V> VAssertions.fail()Fail the test without a failure message.static <V> VFail the test with the given failuremessage.static <V> VFail the test with the given failuremessageas well as the underlyingcause.static <V> VFail the test with the given underlyingcause.static <V> VFail the test with the failure message retrieved from the givenmessageSupplier.
- 
Uses of Contract in org.junit.platform.commons.supportMethods in org.junit.platform.commons.support with annotations of type ContractModifier and TypeMethodDescriptionstatic booleanAnnotationSupport.isAnnotated(@Nullable AnnotatedElement element, Class<? extends Annotation> annotationType) Determine if an annotation ofannotationTypeis either present or meta-present on the suppliedelement.static booleanAnnotationSupport.isAnnotated(@Nullable Optional<? extends AnnotatedElement> element, Class<? extends Annotation> annotationType) Determine if an annotation ofannotationTypeis either present or meta-present on the supplied optionalelement.
- 
Uses of Contract in org.junit.platform.commons.utilMethods in org.junit.platform.commons.util with annotations of type ContractModifier and TypeMethodDescriptionstatic voidAssert that the suppliedpredicateistrue.static voidAssert that the suppliedpredicateistrue.static booleanStringUtils.containsIsoControlCharacter(@Nullable String str) Determine if the suppliedStringcontains any ISO control characters.static <T extends Collection<?>>
 @Nullable TPreconditions.containsNoNullElements(@Nullable T collection, String message) Assert that the supplied collection contains nonullelements.static <T extends Collection<?>>
 @Nullable TPreconditions.containsNoNullElements(@Nullable T collection, Supplier<String> messageSupplier) Assert that the supplied collection contains nonullelements.static <T> T @Nullable []Preconditions.containsNoNullElements(T @Nullable [] array, String message) Assert that the supplied array contains nonullelements.static <T> T @Nullable []Preconditions.containsNoNullElements(T @Nullable [] array, Supplier<String> messageSupplier) Assert that the supplied array contains nonullelements.static booleanStringUtils.containsWhitespace(@Nullable String str) Determine if the suppliedStringcontains any whitespace characters.static booleanStringUtils.doesNotContainIsoControlCharacter(@Nullable String str) Determine if the suppliedStringdoes not contain any ISO control characters.static booleanStringUtils.doesNotContainWhitespace(@Nullable String str) Determine if the suppliedStringdoes not contain any whitespace characters.static booleanAnnotationUtils.isAnnotated(@Nullable AnnotatedElement element, Class<? extends Annotation> annotationType) Determine if an annotation ofannotationTypeis either present or meta-present on the suppliedelement.static booleanAnnotationUtils.isAnnotated(@Nullable Optional<? extends AnnotatedElement> element, Class<? extends Annotation> annotationType) Determine if an annotation ofannotationTypeis either present or meta-present on the supplied optionalelement.static booleanDetermine if the suppliedStringis blank (i.e.,nullor consisting only of whitespace characters).static booleanStringUtils.isNotBlank(@Nullable String str) static StringAssert that the suppliedStringis not blank.static StringAssert that the suppliedStringis not blank.static int[]Assert that the supplied array is neithernullnor empty.static <T extends Collection<?>>
 TAssert that the suppliedCollectionis neithernullnor empty.static <T extends Collection<?>>
 TAssert that the suppliedCollectionis neithernullnor empty.static <T> T[]Assert that the supplied array is neithernullnor empty.static <T> T[]Assert that the supplied array is neithernullnor empty.static <T> TAssert that the suppliedObjectis notnull.static <T> TAssert that the suppliedObjectis notnull.static @Nullable StringStringUtils.replaceIsoControlCharacters(@Nullable String str, String replacement) Replace all ISO control characters in the suppliedString.static @Nullable StringStringUtils.replaceWhitespaceCharacters(@Nullable String str, String replacement) Replace all whitespace characters in the suppliedString.static RuntimeExceptionExceptionUtils.throwAsUncheckedException(Throwable t) Throw the suppliedThrowable, masked as an unchecked exception.