Package org.storynode.pigeon.assertion
Class ResultAssert<T,E>
java.lang.Object
org.assertj.core.api.AbstractAssert<ResultAssert<T,E>,Result<T,E>>
org.storynode.pigeon.assertion.ResultAssert<T,E>
- All Implemented Interfaces:
org.assertj.core.api.Assert<ResultAssert<T,,E>, Result<T, E>> org.assertj.core.api.Descriptable<ResultAssert<T,,E>> org.assertj.core.api.ExtensionPoints<ResultAssert<T,E>, Result<T, E>>
public class ResultAssert<T,E>
extends org.assertj.core.api.AbstractAssert<ResultAssert<T,E>,Result<T,E>>
ResultAssert class.
- Author:
- Andrea Coronese
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionisError()isOk()<U> ResultAssert<T, E> Asserts that the provided function returnsexpectedMethods 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, 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, describedAs
-
Constructor Details
-
ResultAssert
Constructor for ResultAssert.- Parameters:
teResult- aResultobject
-
-
Method Details
-
isOk
- Returns:
- a
ResultAssertobject
-
unwraps
- Parameters:
value- a T object- Returns:
- a
ResultAssertobject
-
isError
- Returns:
- a
ResultAssertobject
-
returns
public <U> ResultAssert<T,E> returns(U expected, @NotNull @NotNull Function<Result<T, E>, U> provider) Asserts that the provided function returnsexpected- Type Parameters:
U- the type of the expected result- Parameters:
expected- the expected resultprovider- aFunctionobject that is provided with aResultas input- Returns:
- a
ResultAssertobject
-