Skip to content

Commit

Permalink
Remove default value of assertSuccess in testAwait
Browse files Browse the repository at this point in the history
  • Loading branch information
arkivanov committed Mar 26, 2021
1 parent 2c322aa commit 8a85e08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ import com.badoo.reaktive.single.Single
* @param assertSuccess when provided, it will be called in case of [Single] success.
* This gives an opportunity to assert the result.
*/
expect fun <T> Single<T>.testAwait(assertError: ((Throwable) -> Unit)? = null, assertSuccess: (T) -> Unit = {})
expect fun <T> Single<T>.testAwait(assertError: ((Throwable) -> Unit)? = null, assertSuccess: (T) -> Unit)
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import kotlin.test.assertSame
class TestAwaitTest {

@Test
fun succeeds_WHEN_upstream_succeeded_and_no_assertSuccess() =
fun succeeds_WHEN_upstream_succeeded_and_empty_assertSuccess() =
singleOf(1)
.testAwait()
.testAwait(assertSuccess = {})

@Test
fun succeeds_WHEN_upstream_succeeded_and_assertSuccess_did_not_throw() =
Expand All @@ -23,6 +23,6 @@ class TestAwaitTest {
val error = Exception()

return singleOfError<Nothing>(error)
.testAwait(assertError = { assertSame(error, it) })
.testAwait(assertError = { assertSame(error, it) }, assertSuccess = {})
}
}

0 comments on commit 8a85e08

Please sign in to comment.