Awaitility 3.1.5 is released

4 views
Skip to first unread message

Johan Haleby

unread,
Dec 6, 2018, 9:53:07 AM12/6/18
to await...@googlegroups.com
Awaitility 3.1.5 is released. Changes are:
* Added a new Kotlin extension function called "has" that allows writing succinct expressions when testing for properties in e.g. data classes. For example:

  val data = await untilCallTo { fakeObjectRepository.data } has {
       state == "Hello"
  }

  where "data" is defined as:

  data class Data(var state: String)

  I.e. inside the scope of "has" the "Data" instance is used as "this" (see [here](https://kotlinlang.org/docs/reference/lambdas.html#function-literals-with-receiver) for more info).
  This is the same as doing:

  await untilCallTo { fakeObjectRepository.data } matches { data ->
      data?.state == "Hello"
  }
* Improved error message for "untilNotNull" Kotlin extension function
* Added "untilNull" extension function to the Kotlin DSL: await untilNull { myDataRepository.findById("id") }

Enjoy!
Reply all
Reply to author
Forward
0 new messages