Skip to content

Releases: mockito/mockito-kotlin

1.1.0

27 Dec 19:18

Choose a tag to compare

  • Updates Mockito to 2.4.5
  • Updates Kotlin to 1.0.6
  • Adds argWhere ( #141 )
  • Adds BDDMockito functions ( #142 )

1.0.1

12 Dec 18:55

Choose a tag to compare

  • Properly handles null values in argument matchers ( #133 )
  • Throws a descriptive error when null is passed to the check function ( #134 )

1.0.0

06 Dec 12:35

Choose a tag to compare

This is the first major release for Mockito-Kotlin.

What is Mockito-Kotlin?

Mockito-Kotlin is a wrapper library around Mockito.

It provides top-level functions to allow for a more idiomatic approach while using Mockito in Kotlin.
Furthermore, Mockito returns null values for calls to method like any(), which can cause NullPointerExceptions when passing them to non-nullable parameters. This library solves that issue by trying to create actual instances to return.

Mockito-Kotlin does not intend to alter any of the functionality that Mockito provides, except in places where crucial for working with Kotlin.

See the Wiki to find out how to work with Mockito-Kotlin.

1.0.0-RC1

06 Dec 12:39

Choose a tag to compare

This is the first and possibly only release candidate for Mockito-Kotlin 1.0.0.

Changes in this version:

  • Removes any deprecated methods.

0.12.0

06 Dec 12:39

Choose a tag to compare

  • isA() returns a non-null instance

0.12.1

06 Dec 12:38

Choose a tag to compare

  • Updates Kotlin to 1.0.5-2
  • Updates Mockito to 2.2.17
  • inOrder accepts a lambda for easy verification (#122)

0.12.0

06 Dec 12:38

Choose a tag to compare

  • Updates Kotlin to 1.0.5
  • Updates Mockito to 2.2.15
  • eq() returns passed value, and accepts nullable values (#117)
  • Uses null as T as default return type, with the create instance mechanism as a fallback.

0.11.0

06 Dec 12:38

Choose a tag to compare

  • More convenient API for stubbing nullable types
  • Adds a fallback to the constructors when mocking a class fails

0.10.1

03 Nov 10:52

Choose a tag to compare

  • Fixes a NPE thrown when trying to mock a generic type (#104)
  • Doesn't try to mock primitive and wrapper types anymore (#106)

0.10.0

03 Nov 10:47

Choose a tag to compare

  • Updates Mockito to 2.2.9
  • Fixes an infinite loop caused by 'copy constructors' (#99)
  • Adds nullableArgumentCaptor to be able to work with lists of nullables (#100)
    • Change in the way an 'easiest' constructor is found by skipping optional parameters (#101)