| Package | Description |
|---|---|
| org.unitils.mock | |
| org.unitils.mock.core | |
| org.unitils.mock.core.matching.impl | |
| org.unitils.mock.dummy | |
| org.unitils.mock.mockbehavior | |
| org.unitils.mock.mockbehavior.impl |
| Modifier and Type | Method and Description |
|---|---|
T |
Mock.oncePerforms(MockBehavior mockBehavior)
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
|
T |
Mock.performs(MockBehavior mockBehavior)
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
|
| Modifier and Type | Field and Description |
|---|---|
protected MockBehavior |
BehaviorDefiningInvocation.mockBehavior |
| Modifier and Type | Method and Description |
|---|---|
protected MockBehavior |
PartialMockProxy.getDefaultMockBehavior(ProxyInvocation proxyInvocation) |
protected MockBehavior |
MockProxy.getDefaultMockBehavior(ProxyInvocation proxyInvocation) |
MockBehavior |
ObservedInvocation.getMockBehavior() |
MockBehavior |
BehaviorDefiningInvocation.getMockBehavior() |
protected MockBehavior |
MockProxy.getValidMockBehavior(ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
MockProxy.assertCanExecute(MockBehavior mockBehavior,
ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation)
Check whether the mock behavior can applied for this invocation
|
protected MatchingInvocationHandler |
MockObject.createAlwaysMatchingBehaviorDefiningMatchingInvocationHandler(MockBehavior mockBehavior) |
protected MatchingInvocationHandler |
MockObject.createOneTimeMatchingBehaviorDefiningMatchingInvocationHandler(MockBehavior mockBehavior) |
T |
MockObject.oncePerforms(MockBehavior mockBehavior)
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
|
T |
MockObject.performs(MockBehavior mockBehavior)
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
|
void |
BehaviorDefiningInvocation.setMockBehavior(MockBehavior mockBehavior) |
| Constructor and Description |
|---|
BehaviorDefiningInvocation(ProxyInvocation proxyInvocation,
MockBehavior mockBehavior,
List<ArgumentMatcher> argumentMatchers)
Creates a behavior defining invocation for the given prosy invocation.
|
ObservedInvocation(ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation,
MockBehavior mockBehavior)
Creates a observed invocation for the given prosy invocation.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
BehaviorDefiningMatchingInvocationHandler.ChainedMockBehavior |
| Modifier and Type | Field and Description |
|---|---|
protected MockBehavior |
BehaviorDefiningMatchingInvocationHandler.mockBehavior |
protected MockBehavior |
BehaviorDefiningMatchingInvocationHandler.ChainedMockBehavior.originalMockBehavior |
| Constructor and Description |
|---|
BehaviorDefiningMatchingInvocationHandler(MockBehavior mockBehavior,
BehaviorDefiningInvocations behaviorDefiningInvocations,
MockFactory mockFactory) |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
DummyObjectUtil.createDummy(Class<T> type,
MockBehavior mockBehaviour) |
| Constructor and Description |
|---|
DummyObjectUtil.DummyObjectInvocationHandler(Class<?> dummyObjectType,
MockBehavior mockBehavior) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ValidatableMockBehavior
todo javadoc
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultValueReturningMockBehavior
Mock behavior that returns a default value.
|
class |
DummyValueReturningMockBehavior
Mock behavior that returns a default value.
|
class |
ExceptionThrowingMockBehavior
Mock behavior that throws a given exception.
|
class |
NoopMockBehavior
Mock behavior that does nothing.
|
class |
OriginalBehaviorInvokingMockBehavior
Mock behavior that, instead of mocking the method invocation, performs the actual behavior of the mocked class.
|
class |
StubMockBehavior
Mock behavior that returns a default value if a value can be returned, nothing happens when the result type is void.
|
class |
ValueReturningMockBehavior
Mock behavior that returns a given value.
|
Copyright © 2016. All Rights Reserved.