Last active
February 5, 2018 13:30
-
-
Save soudmaijer/3aee328b64001dc94452b109c461d4f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun expectations(crossinline block: KExpectations.() -> Unit) { | |
object : KExpectations() { | |
init { | |
block() | |
} | |
} | |
} | |
inline fun verifications(crossinline block: KVerifications.() -> Unit) { | |
object : KVerifications() { | |
init { | |
block() | |
} | |
} | |
} | |
open class KExpectations : mockit.Expectations() { | |
public var result: Any? = null | |
public var any: Any? = null | |
public var anyString = String() | |
public var anyLong: Long = 0L | |
public var anyInt: Int = 0 | |
public var anyShort: Short = 0 | |
public var anyByte: Byte = 0 | |
public var anyBoolean: Boolean = false | |
public var anyChar: Char = '\u0000' | |
public var anyDouble: Double = 0.0 | |
public var anyFloat: Float = 0.0f | |
public var times: Int = 0 | |
public var minTimes: Int = 0 | |
public var maxTimes: Int = 0 | |
} | |
open class KVerifications : mockit.Verifications() { | |
public var any: Any? = null | |
public var anyString = String() | |
public var anyLong: Long = 0L | |
public var anyInt: Int = 0 | |
public var anyShort: Short = 0 | |
public var anyByte: Byte = 0 | |
public var anyBoolean: Boolean = false | |
public var anyChar: Char = '\u0000' | |
public var anyDouble: Double = 0.0 | |
public var anyFloat: Float = 0.0f | |
public var times: Int = 0 | |
public var minTimes: Int = 0 | |
public var maxTimes: Int = 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment