GCX-HCI / ThirtyInch

a MVP library for Android favoring a stateful Presenter
Apache License 2.0
1.03k stars 101 forks source link

Convert TiLifecycleObserverTest to Kotlin #177

Closed lukaszkalnik closed 5 years ago

lukaszkalnik commented 5 years ago

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().~

~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 in test 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 .

StefMa commented 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

Patch Links:

— 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 .