Class AbstractEnumAssert<A extends AbstractEnumAssert<A,E>,E extends Enum<E>>
java.lang.Object
org.assertj.core.api.AbstractAssert<A,E>
io.github.ascopes.jct.assertions.AbstractEnumAssert<A,E>
- Type Parameters:
A
- the implementation type.E
- the enum type.
- All Implemented Interfaces:
Assert<A,
,E> Descriptable<A>
,ExtensionPoints<A,
E>
- Direct Known Subclasses:
DiagnosticKindAssert
,JavaFileObjectKindAssert
public abstract class AbstractEnumAssert<A extends AbstractEnumAssert<A,E>,E extends Enum<E>>
extends AbstractAssert<A,E>
Abstract base class for an assertion on an
Enum
.- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractEnumAssert
(@Nullable E value, Class<?> selfType) Initialize this enum assertion. -
Method Summary
Modifier and TypeMethodDescriptionfinal A
Assert that the value is one of the given values.final A
isAnyOfElements
(Collection<E> elements) Assert that the value is one of the given values.final A
Assert that the value is none of the given values.final A
isNoneOfElements
(Collection<E> elements) Assert that the value is one of the given values.Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractEnumAssert
Initialize this enum assertion.- Parameters:
value
- the value to assert upon.selfType
- the type of this assertion implementation.
-
-
Method Details
-
isAnyOf
Assert that the value is one of the given values.- Parameters:
elements
- the elements to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException
- if any of the elements to test against are null.IllegalArgumentException
- if the elements array is empty.AssertionError
- if the actual value is null, or if the value is not in the given group of acceptable values.
-
isAnyOfElements
Assert that the value is one of the given values.- Parameters:
elements
- the elements to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException
- if any of the elements to test against are null.IllegalArgumentException
- if the elements collection is empty.AssertionError
- if the actual value is null, or if the value is not in the given iterable of acceptable values.
-
isNoneOf
Assert that the value is none of the given values.- Parameters:
elements
- any elements to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException
- if any of the elements to test against are null.IllegalArgumentException
- if the elements array is empty.AssertionError
- if the actual value is null, or if the value is in the given group of acceptable values.
-
isNoneOfElements
Assert that the value is one of the given values.- Parameters:
elements
- the elements to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException
- if any of the elements to test against are null.IllegalArgumentException
- if the elements collection is empty.AssertionError
- if the actual value is null, or if the value is in the given iterable of acceptable values.
-