Strikt is very powerful, however it is sometimes hard to find particular methods. This is a handy cheatsheet.
expect
, expectThat
, expectCatching
and expectThrows
import com.fasterxml.jackson.annotation.JsonValue | |
enum class AccountStatus(@JsonValue val text: String) { | |
PENDING("Pending"), | |
ACTIVE("Active"), | |
EXPIRED("Expired"), | |
CANCELLED("Cancelled"); | |
companion object { | |
private val valuesByText = values().associateBy { it.text } |
Kotlin language website is at https://kotlinlang.org.
All the codes here can be copied and run on Kotlin online editor.
;
to break statements./* This is comment */
for multi line comments and // for single line comment
.My aim is to define a set of rules that can be used to decide whether an incremental data change is backwardly compatible or not, list things to beware of for a particular change, and mitigations that can be put in place.
Clearly it is assumed that the services will be using API versioning, and that a major API version number change would allow any required change to that API. The scope of this document is to explore what changes can be made within a single API version.
There are four main release management models, each of which has its own requirements and challenges in versioning the APIs.
The >>>
operator allows a sequence of values to be returned:
myMock.someCall() >>> ['first value', 'second value', 'third value', 'etc']
This returns each string in turn. Behaviour (such as throwing exceptions) in closures cannot be used by this operator.
The >>
operator allows value or behaviour (closures) to be returned