예제 #1
0
 @Test
 public void multipleActions() {
   Zone zone = new Zone();
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.UPDATE_ZONE));
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.SAVE_ZOMBIES));
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.SAVE_PEEK));
   assertEquals(3, zone.getLastUserActions().size());
 }
예제 #2
0
 @Test
 public void toJson() {
   Zone zone = new Zone();
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.UPDATE_ZONE));
   String json = GsonUtil.objectToJson(zone);
   assertTrue(json.contains(UpdateAction.UPDATE_ZONE.toString()));
 }
예제 #3
0
 @Test
 public void sameActionTwice() {
   Zone zone = new Zone();
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.UPDATE_ZONE));
   zone.addLastUserAction(new UserAction(null, null, null, null, UpdateAction.UPDATE_ZONE));
   assertEquals(1, zone.getLastUserActions().size());
 }