Java Code Examples for org.easymock.Capture.reset()

The following are Jave code examples for showing how to use reset() of the org.easymock.Capture class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: athena   File: GossipDeviceStoreTest.java   Source Code and License Vote up 6 votes
private <T> void resetCommunicatorExpectingSingleBroadcast(
        Capture<T> message,
        Capture<MessageSubject> subject,
        Capture<Function<T, byte[]>> encoder) {

    message.reset();
    subject.reset();
    encoder.reset();
    reset(clusterCommunicator);
    clusterCommunicator.broadcast(
                capture(message),
                capture(subject),
                capture(encoder));
    expectLastCall().once();
    replay(clusterCommunicator);
}
 
Example 2
Project: athena   File: GossipDeviceStoreTest.java   Source Code and License Vote up 5 votes
private <T> void resetCommunicatorExpectingNoBroadcast(
        Capture<T> message,
        Capture<MessageSubject> subject,
        Capture<Function<T, byte[]>> encoder) {
    message.reset();
    subject.reset();
    encoder.reset();
    reset(clusterCommunicator);
    replay(clusterCommunicator);
}