Skip to content

Commit 6f297a4

Browse files
committed
minor refactoring for testing
1 parent f11acd3 commit 6f297a4

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

app/src/androidTest/kotlin/com/hana053/micropost/testing/EspressoHelpers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fun atPositionOnView(
1313
targetId: Int
1414
) = object : BoundedMatcher<View, RecyclerView>(RecyclerView::class.java) {
1515

16-
override fun matchesSafely(recyclerView: RecyclerView): Boolean =
16+
override fun matchesSafely(recyclerView: RecyclerView) =
1717
recyclerView.findViewHolderForAdapterPosition(position)
1818
.itemView
1919
.findViewById(targetId)

app/src/main/kotlin/com/hana053/micropost/pages/usershow/UserShowModule.kt

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ fun userShowModule() = Kodein.Module {
2323

2424
}
2525

26-

app/src/test/kotlin/com/hana053/micropost/testing/TestSchedulerProxy.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal class TestSchedulerProxy {
2828
}
2929
}
3030

31-
fun get(): TestSchedulerProxy = INSTANCE
31+
fun get() = INSTANCE
3232
}
3333

3434
}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package com.hana053.micropost.testing
22

3-
import okhttp3.MediaType
43
import okhttp3.ResponseBody
5-
import okio.BufferedSource
64

75
class EmptyResponseBody : ResponseBody() {
86

9-
override fun contentType(): MediaType? = null
7+
override fun contentType() = null
108
override fun contentLength(): Long = 0
11-
override fun source(): BufferedSource? = null
9+
override fun source() = null
1210

1311
}

0 commit comments

Comments
 (0)