All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nhaarman.mockito_kotlin.BDDMockito.kt Maven / Gradle / Ivy

The newest version!
package com.nhaarman.mockito_kotlin

import org.mockito.BDDMockito

fun  given(methodCall: T): BDDMockito.BDDMyOngoingStubbing = BDDMockito.given(methodCall)
fun  given(methodCall: () -> T) = given(methodCall())

fun  then(mock: T): BDDMockito.Then = BDDMockito.then(mock)

infix fun  BDDMockito.BDDMyOngoingStubbing.willAnswer(value: () -> T): BDDMockito.BDDMyOngoingStubbing = willAnswer { value() }
infix fun  BDDMockito.BDDMyOngoingStubbing.willReturn(value: () -> T): BDDMockito.BDDMyOngoingStubbing = willReturn(value())
infix fun  BDDMockito.BDDMyOngoingStubbing.willThrow(value: () -> Throwable): BDDMockito.BDDMyOngoingStubbing = willThrow(value())





© 2015 - 2024 Weber Informatics LLC | Privacy Policy