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