Exemplo n.º 1
0
 @Test
 public void testGetFullAll() {
   Action a1 = actionDao.create(filter, ActionType.PAUSE, "True");
   List<ActionFull> actions = actionDao.getAllFull(filter);
   assertEquals(1, actions.size());
   assertEquals(a1.getActionId(), actions.get(0).getActionId());
 }
Exemplo n.º 2
0
 @Test
 public void testCreateAndGet() {
   Action a1 = actionDao.create(filter, ActionType.PAUSE, "True");
   Action a2 = actionDao.get(a1.getActionId());
   assertEquals(a1, a2);
   assertEquals(a2.getFilterId(), filter.getFilterId());
 }
Exemplo n.º 3
0
 @Test
 public void testGetFull() {
   Action a1 = actionDao.create(filter, ActionType.PAUSE, "True");
   ActionFull action = actionDao.getFull(a1);
   assertEquals(a1.getActionId(), action.getActionId());
   assertEquals(ActionType.PAUSE, action.type);
   assertEquals("True", action.value);
 }
Exemplo n.º 4
0
 @Test(expected = EmptyResultDataAccessException.class)
 public void testDelete() {
   Action a1 = actionDao.create(filter, ActionType.PAUSE, "True");
   actionDao.delete(a1);
   actionDao.get(a1.getActionId());
 }