當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。