Skip to content

Commit 9473cf4

Browse files
authored
Merge pull request #2 from metalgold/satisfying
2 parents d0ee158 + 182b85f commit 9473cf4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/kotlin/in/rcard/assertj/arrowcore/EitherAssert_hasLeftValueSatisfying_Test.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ internal class EitherAssert_hasLeftValueSatisfying_Test {
1313
@Test
1414
internal fun `should fail when either is null`() {
1515
val actual: Either<Int, String>? = null
16-
Assertions.assertThatThrownBy { EitherAssert(actual).hasLeftValueSatisfying { } }
16+
Assertions.assertThatThrownBy { EitherAssert.assertThat(actual).hasLeftValueSatisfying { } }
1717
.isInstanceOf(AssertionError::class.java)
1818
.hasMessage(actualIsNull())
1919
}
2020

2121
@Test
2222
internal fun `should fail if either is right`() {
2323
val actual: Either<Int, String> = Either.Right("something")
24-
Assertions.assertThatThrownBy { EitherAssert(actual).hasLeftValueSatisfying { } }
24+
Assertions.assertThatThrownBy { EitherAssert.assertThat(actual).hasLeftValueSatisfying { } }
2525
.isInstanceOf(AssertionError::class.java)
2626
.hasMessage(EitherShouldBeLeft.shouldBeLeft(actual).create())
2727
}
2828

2929
@Test
3030
internal fun `should fail if consumer fails`() {
3131
val actual: Either<Int, String> = Either.Left(42)
32-
Assertions.assertThatThrownBy { EitherAssert(actual).hasRightValueSatisfying { assertThat(it).isEqualTo(24) } }
32+
Assertions.assertThatThrownBy { EitherAssert.assertThat(actual).hasRightValueSatisfying { assertThat(it).isEqualTo(24) } }
3333
.isInstanceOf(AssertionError::class.java)
3434
.hasMessage(("\nexpected: \"24\"\n but was: \"42\""))
3535
}

src/test/kotlin/in/rcard/assertj/arrowcore/EitherAssert_hasRightValueSatisfying_Test.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ internal class EitherAssert_hasRightValueSatisfying_Test {
1313
@Test
1414
internal fun `should fail when either is null`() {
1515
val actual: Either<Int, String>? = null
16-
assertThatThrownBy { EitherAssert(actual).hasRightValueSatisfying { } }
16+
assertThatThrownBy { EitherAssert.assertThat(actual).hasRightValueSatisfying { } }
1717
.isInstanceOf(AssertionError::class.java)
1818
.hasMessage(actualIsNull())
1919
}
2020

2121
@Test
2222
internal fun `should fail if either is left`() {
2323
val actual: Either<Int, String> = Either.Left(42)
24-
assertThatThrownBy { EitherAssert(actual).hasRightValueSatisfying { } }
24+
assertThatThrownBy { EitherAssert.assertThat(actual).hasRightValueSatisfying { } }
2525
.isInstanceOf(AssertionError::class.java)
2626
.hasMessage(shouldBeRight(actual).create())
2727
}
2828

2929
@Test
3030
internal fun `should fail if consumer fails`() {
3131
val actual: Either<Int, String> = Either.Right("something")
32-
assertThatThrownBy { EitherAssert(actual).hasRightValueSatisfying { assertThat(it).isEqualTo("something else") } }
32+
assertThatThrownBy { EitherAssert.assertThat(actual).hasRightValueSatisfying { assertThat(it).isEqualTo("something else") } }
3333
.isInstanceOf(AssertionError::class.java)
3434
.hasMessage(("\nexpected: \"something else\"\n but was: \"something\""))
3535
}

0 commit comments

Comments
 (0)