@Test public void testRemoveLimitingResourceQueue() throws InstanceNotFoundException { LimitingResourceQueue limitingResourceQueue = createValidLimitingResourceQueue(); limitingResourceQueueDAO.save(limitingResourceQueue); limitingResourceQueueDAO.remove(limitingResourceQueue.getId()); assertFalse(limitingResourceQueueDAO.exists(limitingResourceQueue.getId())); }
@Test public void testLimitingResourceQueueHasElements() { LimitingResourceQueueElement element = createValidLimitingResourceQueueElement(); LimitingResourceQueue queue = createValidLimitingResourceQueue(); queue.addLimitingResourceQueueElement(element); limitingResourceQueueDAO.save(queue); assertTrue(!limitingResourceQueueElementDAO.getAssigned().isEmpty()); }
public String getResourceName() { return limitingResourceQueue.getResource().getName(); }
public void invalidate() { removeChildren(); appendQueueElements(limitingResourceQueue.getLimitingResourceQueueElements()); }
private void createChildren(LimitingResourceQueue limitingResourceQueue, IDatesMapper mapper) { List<QueueTask> queueTasks = createQueueTasks(mapper, limitingResourceQueue.getLimitingResourceQueueElements()); appendQueueTasks(queueTasks); }
@Test public void testSaveLimitingResourceQueue() { LimitingResourceQueue limitingResourceQueue = createValidLimitingResourceQueue(); limitingResourceQueueDAO.save(limitingResourceQueue); assertTrue(limitingResourceQueueDAO.exists(limitingResourceQueue.getId())); }
private LimitingResourceQueue createValidLimitingResourceQueue() { return LimitingResourceQueue.create(); }
public void removeDependenciesFor(LimitingResourceQueue queue) { for (LimitingResourceQueueElement each : queue.getLimitingResourceQueueElements()) { removeDependenciesFor(each); } }