Skip to content

Commit ef0aff9

Browse files
committed
Added KDoc
1 parent 3bf97f7 commit ef0aff9

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@ package `in`.rcard.assertj.arrowcore
33
import arrow.core.Either
44
import org.assertj.core.api.AbstractObjectAssert
55

6+
/**
7+
* Assertions for [Either].
8+
*
9+
* @param <SELF> the "self" type of this assertion class.
10+
* @param <LEFT> type of the left value contained in the [Either].
11+
* @param <RIGHT> type of the right value contained in the [Either].
12+
* @author Riccardo Cardin
13+
*/
614
abstract class AbstractEitherAssert<SELF : AbstractEitherAssert<SELF, LEFT, RIGHT>, LEFT, RIGHT>(either: Either<LEFT, RIGHT>?) :
715
AbstractObjectAssert<SELF, Either<LEFT, RIGHT>>(either, AbstractEitherAssert::class.java) {
16+
17+
/**
18+
* Verifies that the actual [Either] is right.
19+
*
20+
* @return this assertion object.
21+
*/
822
fun isRight() {
923
isNotNull
1024
if (!actual.isRight()) {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ package `in`.rcard.assertj.arrowcore
22

33
import arrow.core.Either
44

5+
/**
6+
* Assertions for [Either].
7+
*
8+
* @param <LEFT> type of the value on the left contained in the [Either].
9+
* @param <RIGHT> type of the value on the right contained in the [Either].
10+
* @author Riccardo Cardin
11+
*/
512
class EitherAssert<LEFT, RIGHT>(either: Either<LEFT, RIGHT>?) :
613
AbstractEitherAssert<EitherAssert<LEFT, RIGHT>, LEFT, RIGHT>(either) {
714
companion object {

0 commit comments

Comments
 (0)