mockito-kotlin v2.0.0-RC2 Release Notes

Release Date: 2018-10-09 // over 5 years ago
  • ๐Ÿ”– Version 2.x will introduce some breaking changes:

    • ๐Ÿคก The artifact to include is now com.nhaarman.mockitokotlin2:mockito-kotlin:x.x.x;
    • ๐Ÿ“ฆ The main package to import from is now com.nhaarman.mockitokotlin2;
    • ๐Ÿคก Mockito-Kotlin does not depend on kotlin-reflect anymore. This solves a few conflict issues when using different Kotlin versions. The artifact mockito-kotlin-kt1.1 is therefore dropped.
      • This removes the creation of arbitrary instances through reflection, which was not necessary anyway due to the T as null quirk.

    ๐Ÿš€ To try this release, use the following:

    testCompile 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC2'
    

    ๐Ÿšš If you included a dependency on kotlin-reflect for Mockito-Kotlin only, you can remove it.

    ๐Ÿ”„ Changes since 2.0.0-RC1:

    • โšก๏ธ Updates Mockito to 2.21.0
    • ๐Ÿคก Inline whenever to let Mockito's UnfinishedStubbing messages work (#278)
    • ๐Ÿคก Replace OngoingStubbing.doReturn(List) with doReturnConsecutively (#279)