Package net.fqsc.inscriptions.model.categories

Examples of net.fqsc.inscriptions.model.categories.Categorie


      isDh = true;
    }

    for (final Iterator iter = categories.iterator(); iter.hasNext();)
    {
      final Categorie categorie = (Categorie) iter.next();

      if (!categorie.getNom().equals("Hardtail"))
      {
        if (!course.getEvenement().getEndroit().equals("Barraute")
            || (course.getEvenement().getEndroit().equals(
                "Barraute") && categorie.getAgeMax() <= 16))
        {
          prix = 10;

          prix += (categorie.getAgeMax() > 16) ? 10 : 0;
          prix += (categorie.getNiveau().equals("elite")) ? 15 : 0;
          prix += (categorie.getNiveau().equals("expert")) ? 10 : 0;
          prix += isDh ? 20 : 0;

          if (isDh && categorie.getCodeCategorie().startsWith("D"))
          {
            tarifications.createTarification(prix, course,
                categorie);
          }

          if (!isDh && categorie.getCodeCategorie().startsWith("X"))
          {
            tarifications.createTarification(prix, course,
                categorie);
          }
        }
View Full Code Here


    final Club club = this.utils.getClubs().getByNom("Subway/Genetik")
        .iterator().next();

    final Course course = evenement.getCourses().getByNom("Cross-Country")
        .iterator().next();
    Categorie categorie = this.utils.getCategories().getByCode("XSE", "M");

    final InfoSaison infoSaison = saison.getInfoSaison(personne, categorie);

    final Inscriptions inscriptions = course.getInscriptions();
    inscriptions.createInscription("Commenditaire", "ABC123", "12", course, personne,
View Full Code Here

  }

  @Test
  public final void testCreateCategorie()
  {
    final Categorie categorie = new Categorie(this.context.getPersistentModel()
        .getDomainModel());

    categorie.setCodeCategorie("XX99");
    categorie.setNom("AAA");
    categorie.setAgeMax(39);
    categorie.setAgeMin(18);
    categorie.setSexe("M");
    categorie.setNiveau("expert");
    categorie.setDiscipline(this.disciplineXC);

    this.categorieCtrl.createCategorie(categorie);

    Assert.assertNotNull(this.categorieCtrl.getByCode("XX99", "M", this.disciplineXC));
  }
View Full Code Here

  }

  @Test(expected = UniqueException.class)
  public final void testCreateCategorieValidateUnique()
  {
    final Categorie categorie = new Categorie(this.context.getPersistentModel()
        .getDomainModel());

    categorie.setCodeCategorie("XU13");
    categorie.setNom("AAA");
    categorie.setAgeMax(39);
    categorie.setAgeMin(18);
    categorie.setSexe("F");
    categorie.setNiveau("expert");
    categorie.setDiscipline(this.disciplineXC);

    this.categorieCtrl.createCategorie(categorie);
  }
View Full Code Here

  }

  @Test
  public final void testUpdateCategorie()
  {
    final Categorie categorieUpdate = (Categorie) this.categorieXSE.copy();
    categorieUpdate.setAgeMax(90);
    this.categorieCtrl.updateCategorie(categorieUpdate);

    final Categorie categorieXSE2 = this.categorieCtrl.getByCode("XSE", "M",
        this.disciplineXC);

    Assert.assertNotNull(categorieXSE2);
    Assert.assertEquals(90, categorieXSE2.getAgeMax());
  }
View Full Code Here

TOP

Related Classes of net.fqsc.inscriptions.model.categories.Categorie

Copyright © 2018 www.massapicom. 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.