当前位置: 首页>>代码示例>>Java>>正文


Java ArgumentsProcessor类代码示例

本文整理汇总了Java中org.mockito.internal.invocation.ArgumentsProcessor的典型用法代码示例。如果您正苦于以下问题:Java ArgumentsProcessor类的具体用法?Java ArgumentsProcessor怎么用?Java ArgumentsProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ArgumentsProcessor类属于org.mockito.internal.invocation包,在下文中一共展示了ArgumentsProcessor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generate

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
public String generate(Object mock, Method method, Object[] arguments) {
    final List<Matcher> matcherList = ArgumentsProcessor.argumentsToMatchers(arguments);
    final PrintSettings printSettings = new PrintSettings();
    MatchersPrinter matchersPrinter = new MatchersPrinter();

    String methodName = Whitebox.getType(mock).getName() + "." + method.getName();
    String invocation = methodName + matchersPrinter.getArgumentsLine(matcherList, printSettings);
    if (printSettings.isMultiline()
            || (!matcherList.isEmpty() && invocation.length() > Whitebox.<Integer> getInternalState(
            PrintSettings.class, "MAX_LINE_LENGTH"))) {
        return methodName + matchersPrinter.getArgumentsBlock(matcherList, printSettings);
    } else {
        return invocation;
    }
}
 
开发者ID:awenblue,项目名称:powermock,代码行数:16,代码来源:ToStringGenerator.java

示例2: ProxyInvocation

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
private ProxyInvocation(Object proxy, Method method, Object[] rawArgs, DelegatingMethod
        mockitoMethod, int sequenceNumber, Location location) {
    this.rawArgs = rawArgs;
    this.proxy = proxy;
    this.method = method;
    this.sequenceNumber = sequenceNumber;
    this.location = location;
    args = ArgumentsProcessor.expandArgs(mockitoMethod, rawArgs);
}
 
开发者ID:linkedin,项目名称:dexmaker,代码行数:10,代码来源:InvocationHandlerAdapter.java

示例3: InterceptedInvocation

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
/**
 * Create a new invocation.
 *
 * @param mock mocked instance
 * @param method method invoked
 * @param arguments arguments to the method
 * @param superMethod super method
 * @param sequenceNumber sequence number of the invocation
 */
InterceptedInvocation(Object mock, MockitoMethod method, Object[] arguments,
                      SuperMethod superMethod, int sequenceNumber) {
    this.mock = mock;
    this.method = method;
    this.arguments = ArgumentsProcessor.expandArgs(method, arguments);
    this.rawArguments = arguments;
    this.superMethod = superMethod;
    this.sequenceNumber = sequenceNumber;
    location = new LocationImpl();
}
 
开发者ID:linkedin,项目名称:dexmaker,代码行数:20,代码来源:InterceptedInvocation.java

示例4: ProxyInvocation

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
private ProxyInvocation(Object proxy, Method method, Object[] rawArgs, DelegatingMethod
                        mockitoMethod, int sequenceNumber, Location location) {
    this.rawArgs = rawArgs;
    this.proxy = proxy;
    this.method = method;
    this.sequenceNumber = sequenceNumber;
    this.location = location;
    args = ArgumentsProcessor.expandArgs(mockitoMethod, rawArgs);
}
 
开发者ID:linkedin,项目名称:dexmaker,代码行数:10,代码来源:InvocationHandlerAdapter.java

示例5: print

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
public String print(Invocation invocation) {
    return print(ArgumentsProcessor.argumentsToMatchers(invocation.getArguments()), invocation);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:4,代码来源:PrintSettings.java

示例6: toString

import org.mockito.internal.invocation.ArgumentsProcessor; //导入依赖的package包/类
@Override
public String toString() {
    return new PrintSettings().print(ArgumentsProcessor.argumentsToMatchers(getArguments()),
            this);
}
 
开发者ID:linkedin,项目名称:dexmaker,代码行数:6,代码来源:InterceptedInvocation.java


注:本文中的org.mockito.internal.invocation.ArgumentsProcessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。