Esempio n. 1
0
 @Test
 public void should_get_product() {
   final Product product = productMapper.findProductById(appleJuice.getId());
   assertThat(product.getName(), is("apple juice"));
   assertThat(product.getDescription(), is("good"));
   final Price currentPrice = product.getCurrentPrice();
   assertThat(currentPrice.getPrice(), is(120));
 }
Esempio n. 2
0
  @Test
  public void should_get_products() {
    final List<Product> products = productMapper.all();
    assertThat(products.size(), is(2));

    final Product product = products.get(0);
    assertThat(product.getName(), is("apple juice"));
    assertThat(product.getCurrentPrice().getPrice(), is(120));
  }