Package net.sf.pmr.keopsframework.domain.validation

Examples of net.sf.pmr.keopsframework.domain.validation.Errors.reject()


    Story story = storyRepository.findByPersistanceId(storyPersistanceId);

    // if the story is not found, return a global error
    if (story == null) {
      Errors errros = AgilePlanningObjectFactory.getErrors();
      errros.reject("story.doesntExistsInDatabase");
      return errros;
    }
   
    Task taskToDelete = null;
   
View Full Code Here


    }
   
    // if the task is not found, return a global error
    if (taskToDelete == null) {
      Errors errros = AgilePlanningObjectFactory.getErrors();
      errros.reject("task.doesntExistsInDatabase");
      return errros;
    }
   
    // else check if the task can be deleted
    Errors errors = taskValidator.validateForDelete(taskToDelete);
View Full Code Here

    Errors errors = AgilePlanningObjectFactory.getErrors();
       
    // if the story is not found, return a global error
    if (story == null) {
      errors.reject("story.doesntExistsInDatabase");
      return errors;
    }

     
        // building object charge
View Full Code Here

       
    Errors errors = AgilePlanningObjectFactory.getErrors();
       
    // if the story is not found, return a global error
    if (story == null) {
      errors.reject("story.doesntExistsInDatabase");
      return errors;
    }


        for (Task task : story.getTasks()) {
View Full Code Here

        story.setTasks(new HashSet<Task>());
        EasyMock.expect(mockStoryRepository.findByPersistanceId(1)).andReturn(story);
     
        // validation (avec erreurs)
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
        EasyMock.expect(mockTaskValidator.validate(EasyMock.isA(Task.class))).andReturn(errors);
       
        // set mock in replay mode
        mocksControl.replay();
       
View Full Code Here

        story.setTasks(new HashSet<Task>());
        EasyMock.expect(mockStoryRepository.findByPersistanceId(1)).andReturn(story);
            
        // validation (avec erreurs)
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
        EasyMock.expect(mockTaskValidator.validate(EasyMock.isA(Task.class))).andReturn(errors);
       
        // set mock in replay mode
        mocksControl.replay();
       
View Full Code Here

       
        // recherche de la story dans la repository
        EasyMock.expect(mockStoryRepository.findByPersistanceId(persistanceId)).andReturn(storyToUpdate);
       
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");

        EasyMock.expect(mockTaskValidator.validate(EasyMock.isA(Task.class))).andReturn(errors);
       
        // set mock in replay mode
        mocksControl.replay();
View Full Code Here

       
        // recherche de la story dans la repository
        EasyMock.expect(mockStoryRepository.findByPersistanceId(storyPersistanceId)).andReturn(story);
       
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");

        EasyMock.expect(mockTaskValidator.validateForDelete(task)).andReturn(errors);
       
        // set mock in replay mode
        mocksControl.replay();
View Full Code Here

    public void testAddWhenValidationFails() {

        // validation (avec erreurs)

        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
        mockIterationValidator.expectValidate(new Ignore(), errors);

        Errors errorsFromService = iterationService.add(1, new Date(), new Date());

        // Vérification des appels
View Full Code Here

        // recherche de l'iteration
        mockIterationRepository.expectFindByPersistanceId(persistanceId, iterationToUpdate);

        // mock de l'erreur
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
        mockIterationValidator.expectValidate(new Ignore(), errors);

        Errors errorsFromService = iterationService.update(new Date(), new Date(), persistanceId, 3);

        // Vérifie les appels
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.