Skip to content

Commit

Permalink
Fix success unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Nov 2, 2023
1 parent 15e159f commit 327b96a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.skydoves.pokedex.core.network

import com.skydoves.sandwich.ApiResponse
import com.skydoves.sandwich.SandwichInitializer
import com.skydoves.sandwich.retrofit.responseOf
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
Expand All @@ -38,7 +39,7 @@ class ApiResponseTest {
@Test
fun success() {
val apiResponse =
ApiResponse.of(SandwichInitializer.successCodeRange) { Response.success("foo") }
ApiResponse.responseOf(SandwichInitializer.successCodeRange) { Response.success("foo") }
if (apiResponse is ApiResponse.Success) {
assertThat(apiResponse.data, `is`("foo"))
}
Expand Down

0 comments on commit 327b96a

Please sign in to comment.