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

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


    public void testAddWhenValidationFails() {

        // validation (avec erreurs)

        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
       
        EasyMock.expect(mockIterationValidator.validate(EasyMock.isA(Iteration.class))).andReturn(errors);
        // set mock in replay mode
        mocksControl.replay();
View Full Code Here


        // recherche de l'iteration
        EasyMock.expect(mockIterationRepository.findByPersistanceId(persistanceId)).andReturn(iterationToUpdate);
       
        // mock de l'erreur
        Errors errors = AgilePlanningObjectFactory.getErrors();
        errors.reject("erreur");
        EasyMock.expect(mockIterationValidator.validate(EasyMock.isA(Iteration.class))).andReturn(errors);

        mocksControl.replay();
       
        Errors errorsFromService = iterationService.update(new Date(), new Date(), persistanceId, 3);
View Full Code Here

          // if no error, add to repository
          try {
              projectRepository.addOrUpdate(basicProject);
          } catch (Exception exception) {
              // in case of exception, it put in the error struture
              errors.reject(exception.getClass().getName());
          }
      }

      return errors;
View Full Code Here

          // if no error, add to repository
          try {
              projectRepository.addOrUpdate(project);
          } catch (Exception exception) {
              // in case of exception, it put in the error struture
              errors.reject(exception.getClass().getName());
          }
      }

      return errors;
       
View Full Code Here

            // if no error, add to repository
            try {
                projectRepository.addOrUpdate(basicProject);
            } catch (Exception exception) {
                // in case of exception, it put in the error struture
                errors.reject(exception.getClass().getName());
            }
        }

        return errors;
    }
View Full Code Here

        }

        if (basicProject.getMembers().size() < 1) {

            errors.reject("basicProject.atLeastOneMember");

        } else {

            boolean oneMemberIsNotNull = false;
View Full Code Here

                }

            }

            if (!oneMemberIsNotNull) {
                errors.reject("basicProject.atLeastOneMember");
            }

        }

        return errors;
View Full Code Here

        }

        if (basicProject.getMembers().size() < 1) {

            errors.reject("basicProject.atLeastOneMember");

        } else {

            boolean oneMemberIsNotNull = false;
View Full Code Here

                }

            }

            if (!oneMemberIsNotNull) {
                errors.reject("basicProject.atLeastOneMember");
            }

        }

        return errors;
View Full Code Here

            // if no error, add to repository
            try {
                basicProjectRepository.addOrUpdate(basicProject);
            } catch (Exception exception) {
                // in case of exception, it put in the error struture
                errors.reject(exception.getClass().getName());
            }
        }

        return errors;
    }
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.