Esempio n. 1
0
  @Test
  public void setMultiplierNegative() {
    Product product = new Product("test", "Test Product", owner);
    product.setMultiplier(-15L);

    assertEquals(Long.valueOf(1), product.getMultiplier());
  }
Esempio n. 2
0
  @Test
  public void setMultiplierBasic() {
    Product product = new Product("test", "Test Product", owner);
    product.setMultiplier(4L);

    assertEquals(Long.valueOf(4), product.getMultiplier());
  }
Esempio n. 3
0
  private Product createTestProduct() {
    Product p = TestUtil.createProduct("testProductId", "Test Product", owner);

    ProductAttribute a1 = new ProductAttribute("a1", "a1");
    p.addAttribute(a1);

    ProductAttribute a2 = new ProductAttribute("a2", "a2");
    p.addAttribute(a2);

    ProductAttribute a3 = new ProductAttribute("a3", "a3");
    p.addAttribute(a3);

    p.setMultiplier(1L);
    return p;
  }