Skip to content

Releases: mockito/mockito-kotlin

2.0.0

30 Oct 09:38
ec75b8a
Compare
Choose a tag to compare

Version 2.x introduces 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 include this, use the following:

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

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

2.0.0-RC3

09 Oct 14:31
3139a2c
Compare
Choose a tag to compare
2.0.0-RC3 Pre-release
Pre-release

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-RC3'

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

Changes since 2.0.0-RC2:

  • Updates Mockito to 2.23.0
    • This enables support for stable coroutines
  • Include argThat(ArgumentMatcher<T>) function #281
  • Remove a deprecated doReturn function (#274)

This should be the last RC before 2.0.0 is released, which will be some time after Kotlin 1.3 is released.

2.0.0-RC2

09 Oct 14:32
e59d36b
Compare
Choose a tag to compare
2.0.0-RC2 Pre-release
Pre-release

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)

2.0.0-RC1

21 Jun 13:04
35f728d
Compare
Choose a tag to compare
2.0.0-RC1 Pre-release
Pre-release

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-RC1'

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

Changes since 2.0.0-alpha04:

  • Updates Mockito to 2.19.0
  • Support mocking with constructor arguments. This breaks code that currently uses useConstructor = true, which can simply be replaced by useConstructor = parameterless(). (#266)

1.6.0

21 Jun 10:24
a0a622f
Compare
Choose a tag to compare

Updates Mockito version to 2.18.3

2.0.0-alpha04

10 May 10:38
bbbcef9
Compare
Choose a tag to compare
2.0.0-alpha04 Pre-release
Pre-release
  • Makes inOrder inline (#248)
  • Adhere to ArgumentMatcher contract (#253)
  • Includes overloads for argumentCaptor (#254)
com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-alpha04

2.0.0-alpha03

03 Feb 11:14
d4b8fec
Compare
Choose a tag to compare
2.0.0-alpha03 Pre-release
Pre-release
  • Updates Mockito to 2.13.0
  • Adds support for coroutines

2.0.0-alpha02

03 Dec 22:00
47424f2
Compare
Choose a tag to compare
2.0.0-alpha02 Pre-release
Pre-release
2.0.0-alpha02

2.0.0-alpha01

30 Nov 22:49
Compare
Choose a tag to compare
2.0.0-alpha01 Pre-release
Pre-release

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-alpha01'

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

1.5.0

03 Jun 15:26
Compare
Choose a tag to compare
  • same() now returns T instead of T?
  • Updates Mockito to 2.8.9
  • Introduces a new artifact for usage with Kotlin 1.1.x:
compile 'com.nhaarman:mockito-kotlin-kt1.1:x.x.x'