@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()); }
@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()); }
@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); }
@Test(expected = EmptyResultDataAccessException.class) public void testDelete() { Action a1 = actionDao.create(filter, ActionType.PAUSE, "True"); actionDao.delete(a1); actionDao.get(a1.getActionId()); }