Skip to content

Commit 568da03

Browse files
committed
feat(58): Added the documentation
1 parent cbf9b68 commit 568da03

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/main/kotlin/in/rcard/assertj/arrowcore/AbstractRaiseAssert.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,27 @@ abstract class AbstractRaiseAssert<
128128
)
129129
}
130130

131+
/**
132+
* Verifies that the actual function in the [Raise] context succeeds and returns an Object assertion
133+
* that allows chaining (object) assertions on the returned value.
134+
*
135+
* @since 1.1.0
136+
* @return a new [AbstractObjectAssert] for assertions chaining on the result value of the function
137+
* in the [Raise] context.
138+
*/
131139
fun result(): AbstractObjectAssert<*, VALUE> {
132140
succeeds()
133141
return Assertions.assertThat((actual as RaiseResult.Success<VALUE>).value)
134142
}
135143

144+
/**
145+
* Verifies that the actual function in the [Raise] context fails and returns an Object assertion
146+
* that allows chaining (object) assertions on the raised error.
147+
*
148+
* @since 1.1.0
149+
* @return a new [AbstractObjectAssert] for assertions chaining on the raised error of the function
150+
* in the [Raise] context.
151+
*/
136152
fun error(): AbstractObjectAssert<*, ERROR> {
137153
fails()
138154
return Assertions.assertThat((actual as RaiseResult.Failure<ERROR>).error)

0 commit comments

Comments
 (0)