Module io.github.ascopes.jct
Package io.github.ascopes.jct.assertions
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
@API(since="0.0.1",
status=STABLE)
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
ConstructorsModifierConstructorDescriptionprotectedAbstractEnumAssert(@Nullable E value, Class<?> selfType) Initialize this enum assertion. -
Method Summary
Modifier and TypeMethodDescriptionfinal AAssert that the value is one of the given values.final AisAnyOfElements(Iterable<E> elements) Assert that the value is one of the given values.final AAssert that the value is none of the given values.final AisNoneOfElements(Iterable<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, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, 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, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, 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:
first- the first value to check for.more- any additional values to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException- if any of the elements to test against are null.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.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:
first- the first value to check for.more- any additional values to check for.- Returns:
- this assertion object.
- Throws:
NullPointerException- if any of the elements to test against are null.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.AssertionError- if the actual value is null, or if the value is in the given iterable of acceptable values.
-