Package org.xrace.model.evenements

Examples of org.xrace.model.evenements.Inscription


  public void testSaveValideCategorie() throws Exception
  {
    try
    {
      final Inscription inscription = new Inscription();
      inscription.setPersonne(personneJDoe);
      inscription.setCategorie(categorieDjsH);
      inscription.setCourse(courseXc5);

      getInscriptionService().save(inscription);

      Assert.fail();
    }
View Full Code Here


  public void testSaveValideDejaInscrit() throws Exception
  {
    try
    {
      final Inscription inscription = new Inscription();
      inscription.setPersonne(personneJDoe);
      inscription.setCategorie(categorieXjsH);
      inscription.setCourse(courseXc1);

      getInscriptionService().save(inscription);

      Assert.fail();
    }
View Full Code Here

    }
  }

  public void testDeleteNoFactureItem() throws Exception
  {
    Inscription inscription = getInscriptionService().findByPersonneCourse(
        personneOKnussen, courseXc1);
    getInscriptionService().delete(inscription);

    Assert.assertEquals(2, getInscriptionService().findByCourseApproved(
        courseXc1).size());
View Full Code Here

        personneOKnussen).size());
  }

  public void testDeleteWithFactureItem() throws Exception
  {
    Inscription inscription = getInscriptionService().findByPersonneCourse(
        personneJDoe, courseXc1);
    getInscriptionService().delete(inscription);

    Assert.assertEquals(2, getInscriptionService().findByCourseApproved(
        courseXc1).size());
View Full Code Here

        personneJDoe).size());
  }

  public void testAjustPriceAndSave() throws Exception
  {
    final Inscription inscription1 = new Inscription();
    inscription1.setPersonne(personneJDoe);
    inscription1.setCategorie(categorieXjsH);
    inscription1.setCourse(courseXc5);

    getInscriptionService().ajustPriceAndSave(inscription1, 1.00);

    Assert.assertEquals(21.00, inscription1.getPrix().doubleValue(), 0.0);

    final Inscription inscription2 = new Inscription();
    inscription2.setPersonne(personneNCote);
    inscription2.setCategorie(categorieXjsH);
    inscription2.setCourse(courseXc5);

    getInscriptionService().ajustPriceAndSave(inscription2, -1.00);

    Assert.assertEquals(19.00, inscription2.getPrix().doubleValue(), 0.0);
  }
View Full Code Here

            new HSSFRichTextString(personneTransaction
                .getNomPrenom()));
      }

      // --------- Information sur l'inscription -------
      final Inscription inscription = dossier.getInscription();
      final Club club = dossier.getClub();
      final Categorie categorie = dossier.getCategorie();

      row.createCell((short) 18).setCellValue(inscription.getId());

      if (club != null)
      {
        row.createCell((short) 19).setCellValue(
            new HSSFRichTextString(club.getNomComplet()));
      }

      row.createCell((short) 20).setCellValue(
          new HSSFRichTextString(inscription.getCommanditaire()));

      try
      {
        final Integer plaqueInt = Integer.parseInt(inscription
            .getNoPlaque());
        row.createCell((short) 21).setCellValue(plaqueInt);
      }
      catch (final NumberFormatException e)
      {
        row.createCell((short) 21).setCellValue(
            new HSSFRichTextString(inscription.getNoPlaque()));
      }

      row.createCell((short) 22).setCellValue(
          new HSSFRichTextString(inscription.getCodePuce()));
      if (inscription.getNumeroPuce() != null)
      {
        row.createCell((short) 23).setCellValue(
            inscription.getNumeroPuce());
      }
      row.createCell((short) 24).setCellValue(
          new HSSFRichTextString(categorie.getNomComplet()));

      if (inscription.getEquipeCourse() != null)
      {
        row.createCell((short) 25).setCellValue(
            new HSSFRichTextString(inscription.getEquipeCourse()
                .getNomEquipe()));
      }

      // --------- Information sur la facture et la transaction -------
      final Facture facture = dossier.getFacture();
      final FactureItem factureItem = dossier.getFactureItem();
      final Transaction transaction = dossier.getTransaction();

      if (facture != null)
      {
        row.createCell((short) 26).setCellValue(facture.getId());
      }

      if (inscription.getPrix() != null)
      {
        row.createCell((short) 27).setCellValue(inscription.getPrix());
      }
      else if (factureItem != null)
      {
        row.createCell((short) 28).setCellValue(
            new HSSFRichTextString(transaction.getTxID()));
View Full Code Here

    Assert.assertEquals("13", getInfoSaisonService()
        .findBySaisonPersonneCategorie(saison2007, personneJDoe,
            categorieXseH).getPlaqueUnique());

    Inscription inscription = getInscriptionService().findByPersonneCourse(
        personneJDoe, courseXC1);
    Assert.assertEquals("13", inscription.getNoPlaque());

    inscription = getInscriptionService().findByPersonneCourse(
        personneJDoe, courseXC2);
    Assert.assertEquals("12", inscription.getNoPlaque());
  }
View Full Code Here

    Assert.assertEquals(course.getInscriptions().size(), result
        .getEntries().size());

    for (final Inscription inscription : course.getInscriptions())
    {
      final Inscription resInscription = result.getEntry(inscription)
          .getInscription();
      Assert.assertNotNull(resInscription);

      Assert.assertEquals(inscription, resInscription);
      Assert.assertEquals(inscription.getNoPlaque(), resInscription
          .getNoPlaque());
    }

    for (final AssignPlaqueResult.Entry entry : result.getEntries())
    {
View Full Code Here

    Evenement evenement1 = getEvenementService().getEvenementParNo(
        saison2007, 1);
    Course courseXc1 = getCourseService().getCourseParNom(evenement1,
        "Cross-Country");

    Inscription inscription = new Inscription();
    inscription.setPersonne(personne);
    inscription.setCategorie(categorie);
    inscription.setCourse(courseXc1);

    getInscriptionService().save(inscription);
  }
View Full Code Here

    equipeCourse.setCreateur(personne2);
    equipeCourse.setNomEquipe("Les goons");

    getEquipeCourseService().save(equipeCourse);

    Inscription inscription1 = new Inscription();
    inscription1 = new Inscription();
    inscription1.setPersonne(personne1);
    inscription1.setCategorie(categorie);
    inscription1.setCourse(courseRvm);
    inscription1.setEquipeCourse(equipeCourse);

    getInscriptionService().save(inscription1);

    Inscription inscription2 = new Inscription();
    inscription2 = new Inscription();
    inscription2.setPersonne(personne2);
    inscription2.setCategorie(categorie);
    inscription2.setCourse(courseRvm);
    inscription2.setEquipeCourse(equipeCourse);

    getInscriptionService().save(inscription2);
  }
View Full Code Here

TOP

Related Classes of org.xrace.model.evenements.Inscription

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.