|
EasyMock example source code file (IExpectationSetters.java)
The EasyMock IExpectationSetters.java source code
/*
* Copyright (c) 2001-2007 OFFIS, Tammo Freese.
* This program is made available under the terms of the MIT License.
*/
package org.easymock;
/**
* Allows setting expectations for an associated expected invocation.
* Implementations of this interface are returned by
* {@link EasyMock#expect(Object)}, and by {@link EasyMock#expectLastCall()}.
*/
public interface IExpectationSetters<T> {
/**
* Sets a return value that will be returned for the expected invocation.
*
* @param value
* the value to return.
* @return this object to allow method call chaining.
*/
IExpectationSetters<T> andReturn(T value);
/**
* Sets a throwable that will be thrown for the expected invocation.
*
* @param throwable
* the throwable to throw.
* @return this object to allow method call chaining.
*/
IExpectationSetters<T> andThrow(Throwable throwable);
/**
* Sets an object that will be used to calculate the answer for the expected
* invocation (either return a value, or throw an exception).
*
* @param answer
* the object used to answer the invocation.
* @return this object to allow method call chaining.
*/
IExpectationSetters<T> andAnswer(IAnswer
Other EasyMock examples (source code examples)Here is a short list of links related to this EasyMock IExpectationSetters.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.