// inherit javadoc
public void run() throws Exception {
FakeMethodConstraints clientConstraints =
new FakeMethodConstraints(null);
FakeBasicInvocationHandler newHandler;
FakeBasicInvocationHandler handler =
new FakeBasicInvocationHandler(new FakeObjectEndpoint(),null);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 1: setClientConstraints(null)");
logger.log(Level.FINE,"");
newHandler =
(FakeBasicInvocationHandler)handler.setClientConstraints(null);
assertion(newHandler.getClientConstraints() == null);
assertion(newHandler.getServerConstraints() == null);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 2: "
+ "setClientConstraints(MethodConstraints)");
logger.log(Level.FINE,"");
newHandler =
(FakeBasicInvocationHandler)handler.setClientConstraints(
clientConstraints);
assertion(newHandler.getClientConstraints() == clientConstraints);
assertion(newHandler.getServerConstraints() == null);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 3: "
+ "setClientConstraints(MethodConstraints) throws exception");
logger.log(Level.FINE,"");
try {
handler = new FakeBadConstructorBasicInvocationHandler();
handler.setClientConstraints(clientConstraints);
assertion(false);
} catch (UndeclaredThrowableException ignore) {
}
try {
handler = new FakeConstructorExceptionBasicInvocationHandler();
handler.setClientConstraints(clientConstraints);
assertion(false);
} catch (UndeclaredThrowableException ignore) {
}
}