Ejemplo n.º 1
0
 private void checkServerState(String drink, final boolean stateShouldChange) {
   try {
     Boolean result = service.checkIfDrankDrink(drink);
     assertTrue(stateShouldChange == result);
   } catch (Exception caught) {
     TestSetValidator.rethrowException(caught);
   }
 }
Ejemplo n.º 2
0
 public void testRpcWithoutXsrfTokenFails() throws Exception {
   try {
     service.drink("kumys");
     fail("Should've failed without XSRF token");
   } catch (Exception caught) {
     RpcTokenException e = (RpcTokenException) caught;
     assertTrue(e.getMessage().contains("XSRF token missing"));
     checkServerState("kumys", false);
   }
 }