Closed lukaszkalnik closed 5 years ago
Is there already an open issue at mockk? If not please create one.
Please also refer the issue here please 👍
On Wed, Dec 26, 2018, 10:17 PM lukaszkalnik <notifications@github.com wrote:
Converts TiLIfecycleObserverTest to Kotlin and MockK. Only exception is the test remove other observer() test which I have left Mockito based because MockK lacks equivalent of verifyNoMoreInteractions().
Please merge after #174 https://github.com/grandcentrix/ThirtyInch/pull/174 .
You can view, comment on, or merge this pull request online at:
https://github.com/grandcentrix/ThirtyInch/pull/177 Commit Summary
- add kotlin support to
thirtyinch
module tests; convert TiTestPresenterTest and TestPresenterExampleTest to kotlin- rename test function
- use verifyOrder
- use testImplementation for kotlin stdlib
- update gradle plugin
- Revert "update gradle plugin"
- convert TiLifecycleObserverTest to kotlin and mockk
File Changes
- M build.gradle https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-0 (2)
- M thirtyinch/build.gradle https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-1 (3)
- D thirtyinch/src/test/java/net/grandcentrix/thirtyinch/TiLifecycleObserverTest.java https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-2 (339)
- A thirtyinch/src/test/java/net/grandcentrix/thirtyinch/TiLifecycleObserverTest.kt https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-3 (303)
- D thirtyinch/src/test/java/net/grandcentrix/thirtyinch/test/TestPresenterExampleTest.java https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-4 (54)
- A thirtyinch/src/test/java/net/grandcentrix/thirtyinch/test/TestPresenterExampleTest.kt https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-5 (47)
- D thirtyinch/src/test/java/net/grandcentrix/thirtyinch/test/TiTestPresenterTest.java https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-6 (144)
- A thirtyinch/src/test/java/net/grandcentrix/thirtyinch/test/TiTestPresenterTest.kt https://github.com/grandcentrix/ThirtyInch/pull/177/files#diff-7 (130)
Patch Links:
- https://github.com/grandcentrix/ThirtyInch/pull/177.patch
- https://github.com/grandcentrix/ThirtyInch/pull/177.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/grandcentrix/ThirtyInch/pull/177, or mute the thread https://github.com/notifications/unsubscribe-auth/AJwYe3nBEyvfoQZL3UVID_IpuWZDiW41ks5u8-d7gaJpZM4ZiGHv .
Converts
TiLifecycleObserverTest
to Kotlin and MockK. ~Only exception is thetest remove other observer()
test which I have left Mockito based because MockK lacks equivalent ofverifyNoMoreInteractions()
.~~There is an open issue at MockK to add support for such functionality:~ ~https://github.com/mockk/mockk/issues/207~
Update: I have managed to work around the lack of
verifyNoMoreInteractions()
in MockK intest remove other observer()
. So all tests in this PR are now MockK based. See https://github.com/grandcentrix/ThirtyInch/pull/177/commits/f5690938c9917aff887ae61f71947e16cad3e37e.Please merge after #174 .