Package org.xrace.model

Examples of org.xrace.model.Article


    Assert.assertEquals(24.0, cartItemArticle.getPrix().doubleValue(), 0.0);
  }

  public void testIsSimilar1() throws Exception
  {
    Article article1 = new Article(choixAmeneAmi);
    article1.setTextFieldValue("Mon ami !");
    CartItemArticle cartItemArticle1 = new CartItemArticle(personneJDoe,
        article1);

    Article article2 = new Article(choixAmeneAmi);
    article2.setTextFieldValue("Mon ami !");
    CartItemArticle cartItemArticle2 = new CartItemArticle(personneJDoe,
        article2);

    Assert.assertTrue(cartItemArticle2.isEquivalent(cartItemArticle1));
  }
View Full Code Here


    Assert.assertTrue(cartItemArticle2.isEquivalent(cartItemArticle1));
  }

  public void testIsSimilar2() throws Exception
  {
    Article article1 = new Article(choixAmeneAmi);
    article1.setTextFieldValue("Mon ami !");
    CartItemArticle cartItemArticle1 = new CartItemArticle(personneJDoe,
        article1);

    Article article2 = new Article(choixAmeneAmi);
    article2.setTextFieldValue("Mon ami !");
    CartItemArticle cartItemArticle2 = new CartItemArticle(personneJDeere,
        article2);

    Assert.assertFalse(cartItemArticle2.isEquivalent(cartItemArticle1));
  }
View Full Code Here

    Assert.assertFalse(cartItemArticle2.isEquivalent(cartItemArticle1));
  }

  public void testIsSimilar4() throws Exception
  {
    Article article1 = new Article(choixAmeneAmi);
    CartItemArticle cartItemArticle1 = new CartItemArticle(personneJDoe,
        article1);

    Article article2 = new Article(choixBBQInvite);
    article2.setQuantite(12);
    CartItemArticle cartItemArticle2 = new CartItemArticle(personneJDoe,
        article2);

    Assert.assertFalse(cartItemArticle2.isEquivalent(cartItemArticle1));
  }
View Full Code Here

    Assert.assertFalse(cartItemArticle2.isEquivalent(cartItemArticle1));
  }

  public void testIsSimilar5() throws Exception
  {
    Article article1 = new Article(choixBBQInvite);
    article1.setQuantite(1);
    CartItemArticle cartItemArticle1 = new CartItemArticle(personneJDoe,
        article1);

    Article article2 = new Article(choixBBQInvite);
    article2.setQuantite(12);
    CartItemArticle cartItemArticle2 = new CartItemArticle(personneJDoe,
        article2);

    Assert.assertTrue(cartItemArticle2.isEquivalent(cartItemArticle1));
  }
View Full Code Here

      }
      else
      {
        final CartItemArticle cartItemArticle = (CartItemArticle) item;

        final Article article = cartItemArticle.getArticle();
        article.setPrix(item.getPrixUnitaire());
        article.setQuantite(item.getQuantite());
        articleService.save(article);

        facture.getFactureItems().add(
            factureItemService.createFactureItem(facture, article,
                cartItemArticle.getPrix()));
View Full Code Here

        inscriptionService.delete(inscription);
      }

      if (item.getArticle() != null)
      {
        final Article art = item.getArticle();
        articleService.delete(art);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.xrace.model.Article

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.