public class Expector extends java.lang.Object
|Constructor and Description|
Initializes the object with the channel and the expected class.
|Modifier and Type||Method and Description|
Receives an object of the expected class.
public Expector(Channel channel, java.lang.Class<?> expectedType)
channel- The channel to use in order to receive.
expectedType- The expected class to receive.
public java.lang.Object receive() throws CheatAttemptException, java.io.IOException
CheatAttemptException- if the received object is not the expected.
java.io.IOException- In case of a problem during receiving the object.