File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/test/kotlin/in/rcard/assertj/arrowcore Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff 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((" \n expected: \" 24\"\n but was: \" 42\" " ))
3535 }
Original file line number Diff line number Diff 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((" \n expected: \" something else\"\n but was: \" something\" " ))
3535 }
You can’t perform that action at this time.
0 commit comments