public class MockKDsl
DSL entry points.
| Modifier and Type | Field and Description |
|---|---|
static MockKDsl |
INSTANCE
DSL entry points.
|
| Modifier and Type | Method and Description |
|---|---|
void |
internalClearConstructorMockk(kotlin.reflect.KClass[] classes,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear constructor mocks.
|
void |
internalClearMocks(java.lang.Object[] mocks,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Resets information associated with mock
|
void |
internalClearObjectMockk(java.lang.Object[] objects,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear object mocks.
|
void |
internalClearStaticMockk(kotlin.reflect.KClass[] classes,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear static mocks.
|
<T> MockKStubScope<T,T> |
internalCoEvery(kotlin.jvm.functions.Function2<? super io.mockk.MockKMatcherScope,? super kotlin.coroutines.experimental.Continuation<? super T>,? extends java.lang.Object> stubBlock)
Starts a block of stubbing for coroutines. Part of DSL.
|
void |
internalCoVerify(Ordering ordering,
boolean inverse,
int atLeast,
int atMost,
int exactly,
long timeout,
kotlin.jvm.functions.Function2<? super io.mockk.MockKVerificationScope,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> verifyBlock)
Verify for coroutines
|
<T> MockKStubScope<T,T> |
internalEvery(kotlin.jvm.functions.Function1<? super io.mockk.MockKMatcherScope,? extends T> stubBlock)
Starts a block of stubbing. Part of DSL.
|
void |
internalInitAnnotatedMocks(java.util.List<? extends java.lang.Object> targets,
boolean overrideRecordPrivateCalls,
boolean relaxUnitFun,
boolean relaxed)
Initializes
|
<T> T |
internalMockkClass(kotlin.reflect.KClass<T> type,
java.lang.String name,
boolean relaxed,
kotlin.reflect.KClass[] moreInterfaces,
boolean relaxUnitFun,
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block)
Builds a mock for a class. Deprecated
|
void |
internalMockkConstructor(kotlin.reflect.KClass[] classes,
boolean recordPrivateCalls,
boolean localToThread)
Constructor mockk
|
void |
internalMockkObject(java.lang.Object[] objects,
boolean recordPrivateCalls)
Object mockk
|
void |
internalMockkStatic(kotlin.reflect.KClass classes)
Static mockk
|
MockKObjectScope |
internalObjectMockk(java.lang.Object[] objs,
boolean recordPrivateCalls)
Declares object mockk. Deprecated
|
<T> T |
internalSpyk(T objToCopy,
java.lang.String name,
kotlin.reflect.KClass[] moreInterfaces,
boolean recordPrivateCalls,
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block)
Builds a new spy for specified class. Initializes object via default constructor.
|
MockKStaticScope |
internalStaticMockk(kotlin.reflect.KClass kClass)
Declares static mockk. Deprecated
|
void |
internalUnmockkAll()
Unmockk everything
|
void |
internalUnmockkConstructor(kotlin.reflect.KClass classes)
Cancel constructor mocks.
|
void |
internalUnmockkObject(java.lang.Object objects)
Cancel object mocks.
|
void |
internalUnmockkStatic(kotlin.reflect.KClass classes)
Cancel static mocks.
|
void |
internalVerify(Ordering ordering,
boolean inverse,
int atLeast,
int atMost,
int exactly,
long timeout,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Verifies calls happened in the past. Part of DSL
|
void |
internalVerifyAll(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for all calls verification
|
void |
internalVerifyOrder(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for ordered calls verification
|
void |
internalVerifySequence(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for sequence calls verification
|
public static MockKDsl INSTANCE
DSL entry points.
public <T> T internalSpyk(T objToCopy,
java.lang.String name,
kotlin.reflect.KClass[] moreInterfaces,
boolean recordPrivateCalls,
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block)
Builds a new spy for specified class. Initializes object via default constructor.
public <T> MockKStubScope<T,T> internalEvery(kotlin.jvm.functions.Function1<? super io.mockk.MockKMatcherScope,? extends T> stubBlock)
Starts a block of stubbing. Part of DSL.
public <T> MockKStubScope<T,T> internalCoEvery(kotlin.jvm.functions.Function2<? super io.mockk.MockKMatcherScope,? super kotlin.coroutines.experimental.Continuation<? super T>,? extends java.lang.Object> stubBlock)
Starts a block of stubbing for coroutines. Part of DSL.
public void internalVerify(Ordering ordering, boolean inverse, int atLeast, int atMost, int exactly, long timeout, kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Verifies calls happened in the past. Part of DSL
public void internalCoVerify(Ordering ordering, boolean inverse, int atLeast, int atMost, int exactly, long timeout, kotlin.jvm.functions.Function2<? super io.mockk.MockKVerificationScope,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> verifyBlock)
Verify for coroutines
public void internalVerifyOrder(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for ordered calls verification
public void internalVerifyAll(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for all calls verification
public void internalVerifySequence(boolean inverse,
kotlin.jvm.functions.Function1<? super io.mockk.MockKVerificationScope,kotlin.Unit> verifyBlock)
Shortcut for sequence calls verification
public void internalClearMocks(java.lang.Object[] mocks,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Resets information associated with mock
public MockKStaticScope internalStaticMockk(kotlin.reflect.KClass kClass)
Declares static mockk. Deprecated
public MockKObjectScope internalObjectMockk(java.lang.Object[] objs, boolean recordPrivateCalls)
Declares object mockk. Deprecated
public <T> T internalMockkClass(kotlin.reflect.KClass<T> type,
java.lang.String name,
boolean relaxed,
kotlin.reflect.KClass[] moreInterfaces,
boolean relaxUnitFun,
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block)
Builds a mock for a class. Deprecated
public void internalInitAnnotatedMocks(java.util.List<? extends java.lang.Object> targets,
boolean overrideRecordPrivateCalls,
boolean relaxUnitFun,
boolean relaxed)
Initializes
public void internalMockkObject(java.lang.Object[] objects,
boolean recordPrivateCalls)
Object mockk
public void internalUnmockkObject(java.lang.Object objects)
Cancel object mocks.
public void internalClearObjectMockk(java.lang.Object[] objects,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear object mocks.
public void internalMockkStatic(kotlin.reflect.KClass classes)
Static mockk
public void internalUnmockkStatic(kotlin.reflect.KClass classes)
Cancel static mocks.
public void internalClearStaticMockk(kotlin.reflect.KClass[] classes,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear static mocks.
public void internalMockkConstructor(kotlin.reflect.KClass[] classes,
boolean recordPrivateCalls,
boolean localToThread)
Constructor mockk
public void internalUnmockkConstructor(kotlin.reflect.KClass classes)
Cancel constructor mocks.
public void internalClearConstructorMockk(kotlin.reflect.KClass[] classes,
boolean answers,
boolean recordedCalls,
boolean childMocks)
Clear constructor mocks.
public void internalUnmockkAll()
Unmockk everything