Examples of countErrors()


Examples of org.xrace.util.validation.ValidationException.countErrors()

  {
    ValidationException vex = new ValidationException();
    vex.addError("code.1", 1, 2);
    vex.addError("code.1", 1, 2);

    assertEquals(2, vex.countErrors());
    assertEquals(2, vex.getErrors().size());
    assertTrue(vex.hasErrors());
    assertTrue(vex.containsError("code.1", 1, 2));
  }
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

    equipeCourse.setNomEquipe("Les goons");

    ValidationException vex = new ValidationException();
    getEquipeCourseService().validate(equipeCourse, vex);

    assertEquals(1, vex.countErrors());
    assertTrue(vex.containsError("EquipeCourse.error.nom.double"));
  }

  public void testSaveOk() throws Exception
  {
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

  public void testCanMerge() throws Exception
  {
    ValidationException vex = new ValidationException();
    Assert.assertTrue(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteAdmin, vex));
    assertEquals(0, vex.countErrors());
  }

  public void testCanMergeMemePersonne() throws Exception
  {
    ValidationException vex = new ValidationException();
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

  public void testCanMergeMemePersonne() throws Exception
  {
    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteNoAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.meme.personne"));
  }

  public void testCanMergeCourseCommun() throws Exception
  {
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

  {
    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteNoAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.meme.personne"));
  }

  public void testCanMergeCourseCommun() throws Exception
  {
    final Cart cart = new Cart();
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

        fact);

    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.meme.course"));
  }

  public void testCanMergeAdmin() throws Exception
  {
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.meme.course"));
  }

  public void testCanMergeAdmin() throws Exception
  {
    compteNonAdmin.setAdmin(true);
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

    getCompteService().save(compteNonAdmin);

    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.admin"));
  }

  public void testMerge() throws Exception
  {
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

    ValidationException vex = new ValidationException();
    Assert.assertFalse(getPersonneMergeService().canMerge(
        personneCompteNoAdmin, personneCompteAdmin, vex));
    assertEquals(1, vex.countErrors());
    assertEquals(1, vex.countErrors("Personne.error.fusion.admin"));
  }

  public void testMerge() throws Exception
  {
    final DossierPersonne dossier = getPersonneMergeService().preMerge(
View Full Code Here

Examples of org.xrace.util.validation.ValidationException.countErrors()

      {
        ValidationException vex = new ValidationException();

        session.getCart().preCheckOutValidate(vex);

        if (vex.countErrors() > 0)
        {
          ValidationUtils.transferToComponent(vex, this);
        }
        else
        {
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.