Class ResultAssert<V,E>
java.lang.Object
org.assertj.core.api.AbstractAssert<ResultAssert<V,E>, Result<V,E>>
dmx.fun.assertj.ResultAssert<V,E>
- Type Parameters:
V- the success value typeE- the error type
- All Implemented Interfaces:
org.assertj.core.api.Assert<ResultAssert<V,E>, Result<V, E>>, org.assertj.core.api.Descriptable<ResultAssert<V, E>>, org.assertj.core.api.ExtensionPoints<ResultAssert<V, E>, Result<V, E>>
@NullMarked
public final class ResultAssert<V,E>
extends org.assertj.core.api.AbstractAssert<ResultAssert<V,E>, Result<V,E>>
AssertJ assertions for
Result.
Obtain instances via DmxFunAssertions.assertThat(Result).
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescriptioncontainsError(E expected) Verifies that theResultisErrand contains the given error.containsValue(V expected) Verifies that theResultisOkand contains the given value.isErr()Verifies that theResultisErr.isOk()Verifies that theResultisOk.Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, 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, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
isOk
Verifies that theResultisOk.- Returns:
- this assertion for chaining
-
isErr
Verifies that theResultisErr.- Returns:
- this assertion for chaining
-
containsValue
Verifies that theResultisOkand contains the given value.- Parameters:
expected- the expected success value- Returns:
- this assertion for chaining
-
containsError
Verifies that theResultisErrand contains the given error.- Parameters:
expected- the expected error value- Returns:
- this assertion for chaining
-