Skip to content

Commit a80e523

Browse files
committed
[add-getRight-and-getLeft-methods] Added deprecations
1 parent cc7701c commit a80e523

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ abstract class AbstractEitherAssert<
9595
*
9696
* @since 0.1.0
9797
*/
98+
@Deprecated(
99+
"hasRightValueSatisfying can be replaced using the method asRight() and chaining assertions on the returned object.",
100+
ReplaceWith("asRight().satisfies(requirement)"),
101+
)
98102
fun hasRightValueSatisfying(requirement: (RIGHT) -> Unit): SELF {
99103
assertIsRight()
100104
actual.onRight { requirement(it) }
@@ -162,6 +166,10 @@ abstract class AbstractEitherAssert<
162166
* @return this assertion object.
163167
* @since 0.1.0
164168
*/
169+
@Deprecated(
170+
"hasLeftValueSatisfying can be replaced using the method asLeft() and chaining assertions on the returned object.",
171+
ReplaceWith("asLeft().satisfies(requirement)"),
172+
)
165173
fun hasLeftValueSatisfying(requirement: (LEFT) -> Unit): SELF {
166174
assertIsLeft()
167175
actual.onLeft { requirement(it) }

0 commit comments

Comments
 (0)