Exemple #1
0
 @Test
 public void testEmptyConstructor() throws Exception {
   product = new Product("5678");
   assertEquals("5678", product.getEan());
   assertNull(product.getName());
   assertNotNull(product.getNameProperty());
   assertEquals(0, product.getPrice());
   assertNotNull(product.getPriceProperty());
 }
Exemple #2
0
 @Test
 public void testSetPrice() throws Exception {
   product.setPrice(567);
   assertEquals(567, product.getPrice());
 }
Exemple #3
0
 @Test
 public void testGetPrice() throws Exception {
   assertEquals(123, product.getPrice());
 }