org.mockito.invocation.Invocation#getArguments ( )源码实例Demo

下面列出了org.mockito.invocation.Invocation#getArguments ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: spring-analysis-note   文件: MockitoUtils.java
private static Object[] getInvocationArguments(Invocation invocation, InvocationArgumentsAdapter... argumentAdapters) {
	Object[] arguments = invocation.getArguments();
	for (InvocationArgumentsAdapter adapter : argumentAdapters) {
		arguments = adapter.adaptArguments(arguments);
	}
	return arguments;
}
 
源代码2 项目: java-technology-stack   文件: MockitoUtils.java
private static Object[] getInvocationArguments(Invocation invocation, InvocationArgumentsAdapter... argumentAdapters) {
	Object[] arguments = invocation.getArguments();
	for (InvocationArgumentsAdapter adapter : argumentAdapters) {
		arguments = adapter.adaptArguments(arguments);
	}
	return arguments;
}
 
源代码3 项目: spring4-understanding   文件: MockitoUtils.java
private static Object[] getInvocationArguments(Invocation invocation, InvocationArgumentsAdapter... argumentAdapters) {
	Object[] arguments = invocation.getArguments();
	for (InvocationArgumentsAdapter adapter : argumentAdapters) {
		arguments = adapter.adaptArguments(arguments);
	}
	return arguments;
}
 
源代码4 项目: astor   文件: MatchersBinder.java
private void validateMatchers(Invocation invocation, List<LocalizedMatcher> lastMatchers) {
    if (!lastMatchers.isEmpty()) {
        int recordedMatchersSize = lastMatchers.size();
        int expectedMatchersSize = invocation.getArguments().length;
        if (expectedMatchersSize != recordedMatchersSize) {
            new Reporter().invalidUseOfMatchers(expectedMatchersSize, lastMatchers);
        }
    }
}
 
源代码5 项目: yangtools   文件: ArgumentsExtractorVerifier.java
@Override
public void verify(final VerificationData data) {
    List<Invocation> actualInvocations =
        InvocationsFinder.findInvocations(data.getAllInvocations(), data.getTarget());
    if (actualInvocations.size() != 1) {
        throw new MockitoException("This verifier can only be used with 1 invocation, got "
                + actualInvocations.size());
    }
    Invocation invocation = actualInvocations.get(0);
    arguments = invocation.getArguments();
    invocation.markVerified();
}
 
源代码6 项目: astor   文件: ArgumentsComparator.java
public boolean argumentsMatch(InvocationMatcher invocationMatcher, Invocation actual) {
    Object[] actualArgs = actual.getArguments();
    return argumentsMatch(invocationMatcher, actualArgs) || varArgsMatch(invocationMatcher, actual);
}