Skip to content

Add methods to extract the result and the error of the execution of a Raise<E>.() -> A function #58

@rcardin

Description

@rcardin

Add to methods to extract the result and the error of the execution of a Raise<E>.() -> A function. Such methods must behave like the OptionAssert.get() method or the EitherAssert.asLeft() and EitherAssert.asRight() methods.

The methods should look like the following:

RaiseAssert.assertThat(lambda).result().satisfies{ result ->
   // ...
}

RaiseAssert.assertThat(lambda).error().satisfies{ error ->
   // ...
}

In detail, the two methods must return an instance of ObjectAssert<T> to let the user concatenate assertions.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions