stub.java

来自「不管是测试驱动开发或者是其它的开发模式」· Java 代码 · 共 24 行

JAVA
24
字号
/*  Copyright (c) 2000-2004 jMock.org
 */
package org.jmock.core;


/**
 * An object that stubs the behaviour of a invokedMethod invocation on behalf of an
 * {@link org.jmock.core.Invokable} object.
 */
public interface Stub
        extends SelfDescribing
{
    /**
     * Processes the invocation.
     *
     * @param invocation The invocation to stub.
     * @return The result of the invocation, if not throwing an exception.
     *         Must return <code>null</code> if the invocation is of a invokedMethod with a void return type.
     * @throws Throwable An exception to be thrown to the caller, if not returning a value.  A checked exception
     *                   thrown from this invokedMethod must be in the <code>throws</code> list of the invoked method.
     */
    Object invoke( Invocation invocation ) throws Throwable;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?