@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());
 }
Exemplo n.º 3
0
 public String getResourceName() {
     return limitingResourceQueue.getResource().getName();
 }
Exemplo n.º 4
0
 public void invalidate() {
     removeChildren();
     appendQueueElements(limitingResourceQueue.getLimitingResourceQueueElements());
 }
Exemplo n.º 5
0
 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();
 }
Exemplo n.º 8
0
 public void removeDependenciesFor(LimitingResourceQueue queue) {
   for (LimitingResourceQueueElement each : queue.getLimitingResourceQueueElements()) {
     removeDependenciesFor(each);
   }
 }