- addBehaviorDefiningInvocation(BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.BehaviorDefiningInvocations
-
- addBehaviorDefiningInvocation(BehaviorDefiningInvocation, BehaviorDefiningInvocations) - Method in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler
-
- addObservedMockInvocation(ObservedInvocation) - Method in class org.unitils.mock.core.Scenario
-
- AfterCreateMock - Annotation Type in org.unitils.mock.annotation
-
Annotation for indicating that a method is to be called after a mock was created.
- afterInit() - Method in class org.unitils.mock.MockModule
-
- afterTestMethod(Object, Method, Throwable) - Method in class org.unitils.mock.MockModule.MockTestListener
-
- alwaysMatchingBehaviorDefiningInvocations - Variable in class org.unitils.mock.core.MockObject
-
- alwaysMatchingBehaviorDefiningInvocations - Variable in class org.unitils.mock.core.MockProxy
-
- any(Class<T>) - Static method in class org.unitils.mock.ArgumentMatchers
-
- AnyArgumentMatcher - Class in org.unitils.mock.argumentmatcher.impl
-
A matcher for checking whether an argument value is of a certain type.
- AnyArgumentMatcher(Class<?>) - Constructor for class org.unitils.mock.argumentmatcher.impl.AnyArgumentMatcher
-
Creates a matcher for the given expected type.
- anyBoolean() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyByte() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyChar() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyDouble() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyFloat() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyInt() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyLong() - Static method in class org.unitils.mock.ArgumentMatchers
-
- anyShort() - Static method in class org.unitils.mock.ArgumentMatchers
-
- ArgumentMatcher - Annotation Type in org.unitils.mock.annotation
-
An annotation for indicating that a method is an argument matcher method.
- ArgumentMatcher - Interface in org.unitils.mock.argumentmatcher
-
A matcher that can check whether a given argument matches certain criteria.
- ArgumentMatcher.MatchResult - Enum in org.unitils.mock.argumentmatcher
-
- ArgumentMatcherPositionFinder - Class in org.unitils.mock.argumentmatcher
-
Utility class for locating argument matchers in method invocations.
- ArgumentMatcherPositionFinder() - Constructor for class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder
-
- ArgumentMatcherPositionFinder.ArgumentMatcherValue - Class in org.unitils.mock.argumentmatcher
-
A value representing a found argument matcher invocation
- ArgumentMatcherPositionFinder.ArgumentMatcherValue(Type) - Constructor for class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.ArgumentMatcherValue
-
- ArgumentMatcherPositionFinder.MethodAnalyzer - Class in org.unitils.mock.argumentmatcher
-
Analyzer that passes the line nrs to the given interpreter.
- ArgumentMatcherPositionFinder.MethodAnalyzer(MethodNode, ArgumentMatcherPositionFinder.MethodInterpreter) - Constructor for class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodAnalyzer
-
Creates an analyzer.
- ArgumentMatcherPositionFinder.MethodInterpreter - Class in org.unitils.mock.argumentmatcher
-
Interpreter that implements the argument matcher finder behavior.
- ArgumentMatcherPositionFinder.MethodInterpreter(Class<?>, String, String, String, int, int, int) - Constructor for class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
Creates an interpreter.
- ArgumentMatcherRepository - Class in org.unitils.mock.argumentmatcher
-
A repository for holding the current set of argument matchers.
- ArgumentMatcherRepository() - Constructor for class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- ArgumentMatchers - Class in org.unitils.mock
-
todo javadoc
- ArgumentMatchers() - Constructor for class org.unitils.mock.ArgumentMatchers
-
- argumentMatchers - Variable in class org.unitils.mock.core.BehaviorDefiningInvocation
-
- assertCanExecute(MockBehavior, ProxyInvocation, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.MockProxy
-
Check whether the mock behavior can applied for this invocation
- assertCanExecute(ProxyInvocation) - Method in class org.unitils.mock.mockbehavior.impl.DefaultValueReturningMockBehavior
-
Checks whether the mock behavior can be executed for the given invocation.
- assertCanExecute(ProxyInvocation) - Method in class org.unitils.mock.mockbehavior.impl.ExceptionThrowingMockBehavior
-
Checks whether the mock behavior can be executed for the given invocation.
- assertCanExecute(ProxyInvocation) - Method in class org.unitils.mock.mockbehavior.impl.OriginalBehaviorInvokingMockBehavior
-
Checks whether the mock behavior can be executed for the given invocation.
- assertCanExecute(ProxyInvocation) - Method in class org.unitils.mock.mockbehavior.impl.StubMockBehavior
-
Stub behavior is always allowed.
- assertCanExecute(ProxyInvocation) - Method in class org.unitils.mock.mockbehavior.impl.ValueReturningMockBehavior
-
Checks whether the mock behavior can be executed for the given invocation.
- assertCanExecute(ProxyInvocation) - Method in interface org.unitils.mock.mockbehavior.ValidatableMockBehavior
-
Checks whether the mock behavior can be executed for the given invocation.
- assertInvoked() - Method in class org.unitils.mock.core.MockObject
-
Asserts that an invocation that matches the invocation following this call has been observed
on this mock object during this test.
- assertInvoked(BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.Scenario
-
- assertInvoked() - Method in interface org.unitils.mock.Mock
-
Asserts that an invocation that matches the invocation following this call has been observed
on this mock object during this test.
- assertInvokedInOrder(BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.Scenario
-
- assertInvokedInSequence() - Method in class org.unitils.mock.core.MockObject
-
Asserts that an invocation that matches the invocation following this call has been observed
on this mock object during this test.
- assertInvokedInSequence() - Method in interface org.unitils.mock.Mock
-
Asserts that an invocation that matches the invocation following this call has been observed
on this mock object during this test.
- AssertInvokedInSequenceVerifyingMatchingInvocationHandler - Class in org.unitils.mock.core.matching.impl
-
- AssertInvokedInSequenceVerifyingMatchingInvocationHandler(Scenario, MockFactory) - Constructor for class org.unitils.mock.core.matching.impl.AssertInvokedInSequenceVerifyingMatchingInvocationHandler
-
- AssertInvokedVerifyingMatchingInvocationHandler - Class in org.unitils.mock.core.matching.impl
-
- AssertInvokedVerifyingMatchingInvocationHandler(Scenario, MockFactory) - Constructor for class org.unitils.mock.core.matching.impl.AssertInvokedVerifyingMatchingInvocationHandler
-
- assertNoMoreInvocations(StackTraceElement[]) - Method in class org.unitils.mock.core.Scenario
-
- assertNoMoreInvocations() - Static method in class org.unitils.mock.MockUnitils
-
- assertNotExpectingInvocation() - Method in class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- assertNotInvoked() - Method in class org.unitils.mock.core.MockObject
-
Asserts that no invocation that matches the invocation following this call has been observed
on this mock object during this test.
- assertNotInvoked(BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.Scenario
-
- assertNotInvoked() - Method in interface org.unitils.mock.Mock
-
Asserts that no invocation that matches the invocation following this call has been observed
on this mock object during this test.
- AssertNotInvokedVerifyingMatchingInvocationHandler - Class in org.unitils.mock.core.matching.impl
-
- AssertNotInvokedVerifyingMatchingInvocationHandler(Scenario, MockFactory) - Constructor for class org.unitils.mock.core.matching.impl.AssertNotInvokedVerifyingMatchingInvocationHandler
-
- AssertVerifyingMatchingInvocationHandler - Class in org.unitils.mock.core.matching.impl
-
- AssertVerifyingMatchingInvocationHandler(Scenario, MockFactory) - Constructor for class org.unitils.mock.core.matching.impl.AssertVerifyingMatchingInvocationHandler
-
- callAfterCreateMockMethods(Object, Mock<?>, String) - Method in class org.unitils.mock.MockModule
-
Calls all
AfterCreateMock annotated methods on the test, passing the given mock.
- CglibProxyMethodInterceptor<T> - Class in org.unitils.mock.core.proxy
-
A cglib method intercepter that will delegate the invocations to the given invocation hanlder.
- CglibProxyMethodInterceptor(String, Class<T>, ProxyInvocationHandler) - Constructor for class org.unitils.mock.core.proxy.CglibProxyMethodInterceptor
-
Creates an interceptor.
- CglibProxyMethodInterceptor.CglibProxyInvocation - Class in org.unitils.mock.core.proxy
-
An invocation implementation that uses the cglib method proxy to be able to invoke the original behavior.
- CglibProxyMethodInterceptor.CglibProxyInvocation(String, Method, List<Object>, StackTraceElement[], Object, MethodProxy) - Constructor for class org.unitils.mock.core.proxy.CglibProxyMethodInterceptor.CglibProxyInvocation
-
Creates an invocation.
- chainedMocksPerName - Variable in class org.unitils.mock.core.MockObject
-
- clear() - Method in class org.unitils.mock.core.BehaviorDefiningInvocations
-
- cloneArray(Object, Map<Object, Object>) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
Clones the given array and all it's elements.
- cloneFields(Class<?>, Object, Object, Map<Object, Object>) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
Clones all values in all fields of the given class and superclasses.
- cloneObject(Object, Map<Object, Object>) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
Actual implementation of the cloning.
- CloneUtil - Class in org.unitils.mock.core.proxy
-
Utility class for deep cloning objects.
- CloneUtil() - Constructor for class org.unitils.mock.core.proxy.CloneUtil
-
- copyOperation(AbstractInsnNode, Value) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- createAlwaysMatchingBehaviorDefiningInvocations() - Method in class org.unitils.mock.core.MockObject
-
- createAlwaysMatchingBehaviorDefiningMatchingInvocationHandler(MockBehavior) - Method in class org.unitils.mock.core.MockObject
-
- createAndInjectDummiesIntoTest(Object) - Method in class org.unitils.mock.MockModule
-
checks for the
Dummy annotation on the testObject.
- createAndInjectMocksIntoTest(Object) - Method in class org.unitils.mock.MockModule
-
- createAndInjectPartialMocksIntoTest(Object) - Method in class org.unitils.mock.MockModule
-
- createArgumentMatchers(ProxyInvocation) - Method in class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- createArgumentMatcherValue(Value) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- createAssertInvokedInSequenceVerifyingMatchingInvocationHandler() - Method in class org.unitils.mock.core.MockObject
-
- createAssertInvokedVerifyingMatchingInvocationHandler() - Method in class org.unitils.mock.core.MockObject
-
- createAssertNotInvokedVerifyingMatchingInvocationHandler() - Method in class org.unitils.mock.core.MockObject
-
- createChainedMock(ProxyInvocation) - Method in class org.unitils.mock.core.matching.impl.AssertVerifyingMatchingInvocationHandler
-
- createChainedMock(ProxyInvocation, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler
-
- createChainedMock(String, Class<T>) - Method in interface org.unitils.mock.core.MockFactory
-
- createChainedMock(String, Class<M>) - Method in class org.unitils.mock.core.MockObject
-
- createDeepClone(T) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
Creates a deep clone of the given object.
- createDetailedObservedInvocationsReport() - Method in class org.unitils.mock.core.Scenario
-
- createDummy(Class<T>) - Static method in class org.unitils.mock.dummy.DummyObjectUtil
-
Creates the dummy proxy object.
- createDummy(Class<T>, MockBehavior) - Static method in class org.unitils.mock.dummy.DummyObjectUtil
-
- createDummy(Class<T>) - Static method in class org.unitils.mock.MockUnitils
-
- createEnhancedClass(Class<T>, Class<?>...) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
- createFullReport() - Method in class org.unitils.mock.core.Scenario
-
- createInitializedOrUninitializedInstanceOfType(Class<T>) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
Creates an instance of the given type.
- createInstanceUsingClone(Object) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
If the given value is cloneable and the cloning succeeds, the clone is returned, else null is returned.
- createInstanceUsingObjenesis(Object) - Static method in class org.unitils.mock.core.proxy.CloneUtil
-
Tries to create an instance of the same type as the given value using Objenesis.
- createLargeValueName(Class<?>, Map<Class<?>, Integer>) - Method in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
Creates a name to replace a large value.
- createMatchingInvocationBuilder() - Method in class org.unitils.mock.core.MockObject
-
- createMock(Object, String, Class<?>) - Method in class org.unitils.mock.MockModule
-
- createMockProxy() - Method in class org.unitils.mock.core.MockObject
-
- createMockProxy() - Method in class org.unitils.mock.core.PartialMockObject
-
- createObservedInvocationsReport() - Method in class org.unitils.mock.core.Scenario
-
- createOneTimeMatchingBehaviorDefiningInvocations() - Method in class org.unitils.mock.core.MockObject
-
- createOneTimeMatchingBehaviorDefiningMatchingInvocationHandler(MockBehavior) - Method in class org.unitils.mock.core.MockObject
-
- createPartialMock(Object, String, Class<?>) - Method in class org.unitils.mock.MockModule
-
- createProxy(String, ProxyInvocationHandler, Class<T>, Class<?>...) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
Creates a proxy object for the given type.
- createProxy(String, boolean, ProxyInvocationHandler, Class<T>, Class<?>...) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
Creates a proxy object for the given type.
- createReport(Scenario) - Method in class org.unitils.mock.report.impl.DefaultScenarioReport
-
Creates a report.
- createReport(List<ObservedInvocation>) - Method in class org.unitils.mock.report.impl.DetailedObservedInvocationsReport
-
Creates a string representation of the given scenario as described in the class javadoc.
- createReport(List<ObservedInvocation>) - Method in class org.unitils.mock.report.impl.ObservedInvocationsReport
-
Creates a string representation of the given invocations as described in the class javadoc.
- createReport(Object, List<ObservedInvocation>) - Method in class org.unitils.mock.report.impl.SuggestedAssertsReport
-
Creates a string representation of the given invocations.
- createReport(Scenario) - Method in interface org.unitils.mock.report.ScenarioReport
-
Creates a report.
- createScenario(Object) - Method in class org.unitils.mock.core.MockObject
-
- createSuggestedAssertsReport() - Method in class org.unitils.mock.core.Scenario
-
- createUninitializedInstanceOfType(Class<T>) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
Creates an instance of the given type.
- createUninitializedProxy(String, ProxyInvocationHandler, Class<T>, Class<?>...) - Static method in class org.unitils.mock.core.proxy.ProxyFactory
-
Creates a proxy object for the given type.
- currentIndex - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- currentLineNr - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- currentMatcherMethod - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- currentMockName - Variable in class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- getArgumentMatcherIndexes(ProxyInvocation, int, int, int) - Static method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder
-
Locates the argument matchers for the given proxy method invocation.
- getArgumentMatcherIndexes(Class<?>, String, Method, int, int, int) - Static method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder
-
Locates the argument matchers for the method invocation on the given line.
- getArgumentMatcherIndexes(MethodInsnNode, List) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- getArgumentMatchers() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- getArguments() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getArgumentsAtInvocationTime() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
The arguments at the time that they were used.
- getAssertInvokedErrorMessage(ProxyInvocation, StackTraceElement) - Method in class org.unitils.mock.core.Scenario
-
- getAssertLocationIndication(StackTraceElement) - Method in class org.unitils.mock.core.Scenario
-
- getAssertNotInvokedErrorMessage(ProxyInvocation, ObservedInvocation, StackTraceElement[]) - Method in class org.unitils.mock.core.Scenario
-
- getBehaviorDefiningInvocation() - Method in class org.unitils.mock.core.ObservedInvocation
-
- getCurrentScenario() - Static method in class org.unitils.mock.core.MockObject
-
- getDefaultMockBehavior(ProxyInvocation) - Method in class org.unitils.mock.core.MockProxy
-
- getDefaultMockBehavior(ProxyInvocation) - Method in class org.unitils.mock.core.PartialMockProxy
-
- getFieldName(Object, Object) - Method in class org.unitils.mock.report.impl.SuggestedAssertsReport
-
Checks whether the given argument value is a value of a field in the test object and, if so, returns the
name of that field.
- getFieldValuesAndNames(Object) - Method in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
Gets all the field values in the given test object with their corresponding field names.
- getInstance() - Static method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- getInvocationLineNr(Class<?>) - Static method in class org.unitils.mock.core.proxy.StackTraceUtils
-
- getInvocationStackTrace(Class<?>) - Static method in class org.unitils.mock.core.proxy.StackTraceUtils
-
- getInvocationStackTrace(Class<?>, boolean) - Static method in class org.unitils.mock.core.proxy.StackTraceUtils
-
- getInvokedAt() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getInvokedAtTrace() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getInvokedOutOfOrderErrorMessage(ObservedInvocation, ObservedInvocation, StackTraceElement) - Method in class org.unitils.mock.core.Scenario
-
- getLineNumber() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getMatchingBehaviorDefiningInvocation(ProxyInvocation) - Method in class org.unitils.mock.core.BehaviorDefiningInvocations
-
First we find all behavior defining invocations that have matching argument matchers and take the one with the highest
matching score (identity match scores higher than an equals match).
- getMatchingBehaviorDefiningInvocation(ProxyInvocation) - Method in class org.unitils.mock.core.MockProxy
-
- getMatchingInvocationBuilder() - Method in class org.unitils.mock.core.MockObject
-
- getMatchInvocationEndLineNr() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- getMatchInvocationIndex() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- getMatchInvocationStartLineNr() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- getMethod(MethodInsnNode) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
Finds a method using the ASM method node
- getMethod() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getMock() - Method in class org.unitils.mock.core.MockObject
-
Returns the mock proxy instance.
- getMock() - Method in interface org.unitils.mock.Mock
-
Gets the mock proxy instance.
- getMockBehavior() - Method in class org.unitils.mock.core.BehaviorDefiningInvocation
-
- getMockBehavior() - Method in class org.unitils.mock.core.ObservedInvocation
-
- getMockedClass(Field) - Method in class org.unitils.mock.MockModule
-
- getMockedType() - Method in class org.unitils.mock.core.MockObject
-
- getMockName() - Method in class org.unitils.mock.core.proxy.CglibProxyMethodInterceptor
-
- getMockName() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getMockName(Object) - Static method in class org.unitils.mock.core.proxy.ProxyUtils
-
- getName() - Method in class org.unitils.mock.core.MockObject
-
- getName() - Method in class org.unitils.mock.report.impl.ProxyInvocationsReport.FormattedObject
-
- getNoMoreInvocationsErrorMessage(List<ObservedInvocation>, StackTraceElement) - Method in class org.unitils.mock.core.Scenario
-
- getNrOfArgumentMacherValues(List<Value>) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- getNrOfNotNullArguments() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getObjectToInject() - Method in class org.unitils.mock.core.MockObject
-
Returns the mock proxy instance.
- getObjectToInjectType(Field) - Method in class org.unitils.mock.core.MockObject
-
- getObservedInvocations() - Method in class org.unitils.mock.core.Scenario
-
- getProxiedMethodStackTrace() - Static method in class org.unitils.mock.core.proxy.ProxyUtils
-
First finds a trace element in which a cglib proxy method was invoked.
- getProxiedType() - Method in class org.unitils.mock.core.proxy.CglibProxyMethodInterceptor
-
- getProxiedTypeIfProxy(Object) - Static method in class org.unitils.mock.core.proxy.ProxyUtils
-
- getProxy() - Method in class org.unitils.mock.core.MockProxy
-
- getProxy() - Method in class org.unitils.mock.core.proxy.ProxyInvocation
-
- getRepresentation() - Method in class org.unitils.mock.report.impl.ProxyInvocationsReport.FormattedObject
-
- getResult() - Method in class org.unitils.mock.core.ObservedInvocation
-
- getResultArgumentMatcherIndexes() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
Gets the result after the analysis was performed.
- getResultAtInvocationTime() - Method in class org.unitils.mock.core.ObservedInvocation
-
- getScenario(Object) - Method in class org.unitils.mock.core.MockObject
-
- getScore() - Method in enum org.unitils.mock.argumentmatcher.ArgumentMatcher.MatchResult
-
- getStackTraceStartingFrom(StackTraceElement[], int) - Static method in class org.unitils.mock.core.proxy.StackTraceUtils
-
- getSuggestedArgument(Object) - Method in class org.unitils.mock.report.impl.SuggestedAssertsReport
-
Creates an appropriate value so that the assert statement will be able to match the given argument value
that was observed in the scenario.
- getSuggestedAssertStatement(Object, ObservedInvocation) - Method in class org.unitils.mock.report.impl.SuggestedAssertsReport
-
Creates an assert statement for the given method invocation and arguments.
- getTestListener() - Method in class org.unitils.mock.MockModule
-
Creates the listener for plugging in the behavior of this module into the test runs.
- getTestObject() - Method in class org.unitils.mock.core.Scenario
-
- getValidMockBehavior(ProxyInvocation, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.MockProxy
-
- getValue(Value, Value...) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- getValue(Value, List<Value>) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- matches(Object, Object) - Method in interface org.unitils.mock.argumentmatcher.ArgumentMatcher
-
Returns true if the given object matches this object's expected argument, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.AnyArgumentMatcher
-
Returns true if the given argument is of the expected type, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.DefaultArgumentMatcher
-
Returns true if the given object matches the expected argument, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.EqualsArgumentMatcher
-
Returns true if the given object matches the expected argument, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.LenEqArgumentMatcher
-
Returns true if the given object matches the expected argument, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.NotNullArgumentMatcher
-
Returns true if the given object is not null, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.NullArgumentMatcher
-
Returns true if the given object is not null, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.RefEqArgumentMatcher
-
Returns true if the given object matches the expected argument, false otherwise.
- matches(Object, Object) - Method in class org.unitils.mock.argumentmatcher.impl.SameArgumentMatcher
-
Returns true if the given object matches the expected argument, false otherwise.
- matches(ProxyInvocation) - Method in class org.unitils.mock.core.BehaviorDefiningInvocation
-
Returns whether or not the given
ProxyInvocation matches this object's predefined
Method and arguments.
- MatchingInvocationBuilder - Class in org.unitils.mock.core.matching
-
- MatchingInvocationBuilder() - Constructor for class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- matchingInvocationBuilder - Variable in class org.unitils.mock.core.MockProxy
-
- MatchingInvocationBuilder.InvocationHandler - Class in org.unitils.mock.core.matching
-
- MatchingInvocationBuilder.InvocationHandler(MatchingInvocationHandler) - Constructor for class org.unitils.mock.core.matching.MatchingInvocationBuilder.InvocationHandler
-
- matchingInvocationBuilderThreadLocal - Static variable in class org.unitils.mock.core.MockObject
-
- matchingInvocationHandler - Variable in class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- MatchingInvocationHandler - Interface in org.unitils.mock.core.matching
-
- MatchStatement - Annotation Type in org.unitils.mock.annotation
-
- MAX_INLINE_PARAMETER_LENGTH - Static variable in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
The maximum length of an inline value
- merge(Value, Value) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
Merges two values.
- methodInterpreter - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodAnalyzer
-
- methodNode - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodAnalyzer
-
- mock - Variable in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler.ChainedMockBehavior
-
- Mock<T> - Interface in org.unitils.mock
-
Declares the contract for a controller object that enables defining the behavior of methods of a mock object,
or for performing assert statements that verify that certain calls were effectively made.
- mockBehavior - Variable in class org.unitils.mock.core.BehaviorDefiningInvocation
-
- mockBehavior - Variable in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler
-
- MockBehavior - Interface in org.unitils.mock.mockbehavior
-
Behavior for a mock instance.
- mockedType - Variable in class org.unitils.mock.core.MockObject
-
- mockFactory - Variable in class org.unitils.mock.core.matching.impl.AssertVerifyingMatchingInvocationHandler
-
- mockFactory - Variable in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler
-
- MockFactory - Interface in org.unitils.mock.core
-
- MockModule - Class in org.unitils.mock
-
Module for testing with mock objects.
- MockModule() - Constructor for class org.unitils.mock.MockModule
-
- MockModule.MockTestListener - Class in org.unitils.mock
-
Test listener that handles the scenario and mock creation, and makes sure a final syntax check
is performed after each test and that scenario reports are logged if required.
- MockModule.MockTestListener() - Constructor for class org.unitils.mock.MockModule.MockTestListener
-
- MockObject<T> - Class in org.unitils.mock.core
-
Implementation of a Mock.
- MockObject(Class<?>, Object) - Constructor for class org.unitils.mock.core.MockObject
-
Creates a mock of the given type with un-capitalized type name + Mock as name, e.g. myServiceMock.
- MockObject(String, Class<?>, Object) - Constructor for class org.unitils.mock.core.MockObject
-
Creates a mock of the given type.
- mockProxy - Variable in class org.unitils.mock.core.MockObject
-
- MockProxy<T> - Class in org.unitils.mock.core
-
- MockProxy(String, Class<T>, BehaviorDefiningInvocations, BehaviorDefiningInvocations, Scenario, MatchingInvocationBuilder) - Constructor for class org.unitils.mock.core.MockProxy
-
- MockProxy.InvocationHandler - Class in org.unitils.mock.core
-
- MockProxy.InvocationHandler() - Constructor for class org.unitils.mock.core.MockProxy.InvocationHandler
-
- MockUnitils - Class in org.unitils.mock
-
- MockUnitils() - Constructor for class org.unitils.mock.MockUnitils
-
- OBJECT_FORMATTER_MAX_NR_ARRAY_OR_COLLECTION_ELEMENTS - Static variable in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
The maximum nr of elements for arrays and collections to display in the reports
- OBJECT_FORMATTER_MAX_RECURSION_DEPT - Static variable in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
The maximum depth (child objects) of objects to display in the reports.
- objectFormatter - Variable in class org.unitils.mock.report.impl.ProxyInvocationsReport
-
- ObservedInvocation - Class in org.unitils.mock.core
-
- ObservedInvocation(ProxyInvocation, BehaviorDefiningInvocation, MockBehavior) - Constructor for class org.unitils.mock.core.ObservedInvocation
-
Creates a observed invocation for the given prosy invocation.
- observedInvocations - Variable in class org.unitils.mock.core.Scenario
-
- ObservedInvocationsReport - Class in org.unitils.mock.report.impl
-
A view that displays the observed invocations and the location where they were invoked.
- ObservedInvocationsReport(Object) - Constructor for class org.unitils.mock.report.impl.ObservedInvocationsReport
-
- oncePerforms(MockBehavior) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
- oncePerforms(MockBehavior) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
- onceRaises(Throwable) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it raises the given exception when the invocation following
this call matches the observed behavior.
- onceRaises(Class<? extends Throwable>) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it raises an instance of the given exception class when the invocation following
this call matches the observed behavior.
- onceRaises(Throwable) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it raises an instance of the given exception class when the invocation following
this call matches the observed behavior.
- onceRaises(Class<? extends Throwable>) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it raises an instance of the given exception class when the invocation following
this call matches the observed behavior.
- onceReturns(Object) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it will return the given value when the invocation following
this call matches the observed behavior.
- onceReturns(Object) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it will return the given value when the invocation following
this call matches the observed behavior.
- oneTimeMatchingBehaviorDefiningInvocations - Variable in class org.unitils.mock.core.MockObject
-
- oneTimeMatchingBehaviorDefiningInvocations - Variable in class org.unitils.mock.core.MockProxy
-
- org.unitils.mock - package org.unitils.mock
-
- org.unitils.mock.annotation - package org.unitils.mock.annotation
-
- org.unitils.mock.argumentmatcher - package org.unitils.mock.argumentmatcher
-
- org.unitils.mock.argumentmatcher.impl - package org.unitils.mock.argumentmatcher.impl
-
- org.unitils.mock.core - package org.unitils.mock.core
-
- org.unitils.mock.core.matching - package org.unitils.mock.core.matching
-
- org.unitils.mock.core.matching.impl - package org.unitils.mock.core.matching.impl
-
- org.unitils.mock.core.proxy - package org.unitils.mock.core.proxy
-
- org.unitils.mock.dummy - package org.unitils.mock.dummy
-
- org.unitils.mock.mockbehavior - package org.unitils.mock.mockbehavior
-
- org.unitils.mock.mockbehavior.impl - package org.unitils.mock.mockbehavior.impl
-
- org.unitils.mock.report - package org.unitils.mock.report
-
- org.unitils.mock.report.impl - package org.unitils.mock.report.impl
-
- OriginalBehaviorInvokingMockBehavior - Class in org.unitils.mock.mockbehavior.impl
-
Mock behavior that, instead of mocking the method invocation, performs the actual behavior of the mocked class.
- OriginalBehaviorInvokingMockBehavior() - Constructor for class org.unitils.mock.mockbehavior.impl.OriginalBehaviorInvokingMockBehavior
-
- originalMockBehavior - Variable in class org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler.ChainedMockBehavior
-
- PartialMock<T> - Interface in org.unitils.mock
-
Declares the contract for a controller object that enables defining the behavior of methods of a partial mock object,
or for performing assert statements that verify that certain calls were effectively made.
- PartialMockObject<T> - Class in org.unitils.mock.core
-
Implementation of a PartialMock.
- PartialMockObject(Object, Object) - Constructor for class org.unitils.mock.core.PartialMockObject
-
Creates a mock of the same type as the given mock prototype with un-capitalized type name + Mock as name, e.g. myServiceMock.
- PartialMockObject(String, Object, Object) - Constructor for class org.unitils.mock.core.PartialMockObject
-
Creates a mock of the same type as the given mock prototype with the given name.
- PartialMockObject(Class<?>, Object) - Constructor for class org.unitils.mock.core.PartialMockObject
-
Creates a mock of the given type with un-capitalized type name + Mock as name, e.g. myServiceMock.
- PartialMockObject(String, Class<?>, Object) - Constructor for class org.unitils.mock.core.PartialMockObject
-
Creates a mock of the given type for the given scenario.
- PartialMockProxy<T> - Class in org.unitils.mock.core
-
- PartialMockProxy(String, Class<T>, BehaviorDefiningInvocations, BehaviorDefiningInvocations, Scenario, MatchingInvocationBuilder) - Constructor for class org.unitils.mock.core.PartialMockProxy
-
- performAssertion(Scenario, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.matching.impl.AssertInvokedInSequenceVerifyingMatchingInvocationHandler
-
- performAssertion(Scenario, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.matching.impl.AssertInvokedVerifyingMatchingInvocationHandler
-
- performAssertion(Scenario, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.matching.impl.AssertNotInvokedVerifyingMatchingInvocationHandler
-
- performAssertion(Scenario, BehaviorDefiningInvocation) - Method in class org.unitils.mock.core.matching.impl.AssertVerifyingMatchingInvocationHandler
-
- performChainedAssertion(Mock<?>) - Method in class org.unitils.mock.core.matching.impl.AssertInvokedInSequenceVerifyingMatchingInvocationHandler
-
- performChainedAssertion(Mock<?>) - Method in class org.unitils.mock.core.matching.impl.AssertInvokedVerifyingMatchingInvocationHandler
-
- performChainedAssertion(Mock<?>) - Method in class org.unitils.mock.core.matching.impl.AssertNotInvokedVerifyingMatchingInvocationHandler
-
- performChainedAssertion(Mock<?>) - Method in class org.unitils.mock.core.matching.impl.AssertVerifyingMatchingInvocationHandler
-
- performs(MockBehavior) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
- performs(MockBehavior) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that will be performed when the invocation following
this call matches the observed behavior.
- proxy - Variable in class org.unitils.mock.core.MockProxy
-
- ProxyFactory - Class in org.unitils.mock.core.proxy
-
Utility class to create and work with proxy objects.
- ProxyFactory() - Constructor for class org.unitils.mock.core.proxy.ProxyFactory
-
- ProxyInvocation - Class in org.unitils.mock.core.proxy
-
An invocation of a proxy method.
- ProxyInvocation(String, Object, Method, List<Object>, StackTraceElement[]) - Constructor for class org.unitils.mock.core.proxy.ProxyInvocation
-
Creates an invocation.
- ProxyInvocation(ProxyInvocation) - Constructor for class org.unitils.mock.core.proxy.ProxyInvocation
-
Creates a copy of the given proxy invocation.
- ProxyInvocationHandler - Interface in org.unitils.mock.core.proxy
-
A class for handling method invocations of a proxy.
- ProxyInvocationsReport - Class in org.unitils.mock.report.impl
-
A base class for reports about proxy invocations.
- ProxyInvocationsReport(Object) - Constructor for class org.unitils.mock.report.impl.ProxyInvocationsReport
-
- ProxyInvocationsReport.FormattedObject - Class in org.unitils.mock.report.impl
-
Class for representing a value that was too large to be displayed inline.
- ProxyInvocationsReport.FormattedObject(String, String) - Constructor for class org.unitils.mock.report.impl.ProxyInvocationsReport.FormattedObject
-
Creates a large value
- ProxyUtils - Class in org.unitils.mock.core.proxy
-
Utility class to create and work with proxy objects.
- ProxyUtils() - Constructor for class org.unitils.mock.core.proxy.ProxyUtils
-
- raises(Throwable) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it raises the given exception when the invocation following
this call matches the observed behavior.
- raises(Class<? extends Throwable>) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it raises the given exception when the invocation following
this call matches the observed behavior.
- raises(Throwable) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it raises the given exception when the invocation following
this call matches the observed behavior.
- raises(Class<? extends Throwable>) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it raises an instance of the given exception class when the invocation following
this call matches the observed behavior.
- readClass(Class<?>) - Static method in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder
-
Uses ASM to read the byte code of the given class.
- refEq(T) - Static method in class org.unitils.mock.ArgumentMatchers
-
- RefEqArgumentMatcher - Class in org.unitils.mock.argumentmatcher.impl
-
A matcher for checking whether an argument equals a given value.
- RefEqArgumentMatcher(Object) - Constructor for class org.unitils.mock.argumentmatcher.impl.RefEqArgumentMatcher
-
Creates a matcher for the given value.
- registerArgumentMatcher(ArgumentMatcher, int) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
Registers an argument matcher at the given line nr.
- registerArgumentMatcher(ArgumentMatcher) - Static method in class org.unitils.mock.ArgumentMatchers
-
- registerEndOfMatchingInvocation(int, String) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
Stops the registering of argument matchers.
- registerStartOfMatchingInvocation(int) - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
- removeWhenUsed - Variable in class org.unitils.mock.core.BehaviorDefiningInvocations
-
- reset() - Method in class org.unitils.mock.argumentmatcher.ArgumentMatcherRepository
-
Clears the current argument matchers.
- reset() - Method in class org.unitils.mock.core.matching.MatchingInvocationBuilder
-
- reset() - Method in class org.unitils.mock.core.Scenario
-
- resetBehavior() - Method in class org.unitils.mock.core.MockObject
-
Removes all behavior defined for this mock.
- resetBehavior() - Method in interface org.unitils.mock.Mock
-
Removes all behavior defined for this mock.
- resolveNumber(Class<?>) - Method in class org.unitils.mock.mockbehavior.impl.DefaultValueReturningMockBehavior
-
Checking for the default java implementations of Number, this avoids class cast exceptions when using them
- resultArgumentMatcherIndexes - Variable in class org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.MethodInterpreter
-
- returns(Object) - Method in class org.unitils.mock.core.MockObject
-
Defines behavior for this mock so that it will return the given value when the invocation following
this call matches the observed behavior.
- returns(Object) - Method in interface org.unitils.mock.Mock
-
Defines behavior for this mock so that it will return the given value when the invocation following
this call matches the observed behavior.