Skip to content

Commit

Permalink
fix(core): Implement Result in AtomicResult (#1393)
Browse files Browse the repository at this point in the history
* fix(core): Implement Result in AtomicResult

* Fix AtomicResultTest
  • Loading branch information
dnys1 authored Feb 23, 2022
1 parent bb033ba commit b2e1b7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AtomicResult(private val result: MethodChannel.Result, private val operati
}
}

override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) {
override fun error(errorCode: String, errorMessage: String?, errorDetails: Any?) {
scope.launch {
if (isSent.getAndSet(true)) {
Log.w(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class AtomicResultTest {
@Test
fun errorIsForwarded() = coroutinesTestRule.testDispatcher.runBlockingTest {
val atomicResult = AtomicResult(mockResult, "errorIsForwarded")
atomicResult.error(null, null, null)
verify(mockResult).error(null, null, null)
atomicResult.error("", null, null)
verify(mockResult).error("", null, null)
}

@Test
Expand Down

0 comments on commit b2e1b7d

Please sign in to comment.