Ejemplo n.º 1
0
  @Test
  public void shouldReturnCorrectProducts_whenLocationIs_NONE() {
    final List<Product> products = database.getProductsFor(NONE);

    List<Product> expected =
        asList(new Product(NEWS, SKY_NEWS), new Product(NEWS, SKY_SPORTS_NEWS));

    assertTrue(products.size() == 2);
    assertTrue(expected.containsAll(products));
  }
Ejemplo n.º 2
0
  @Test
  public void shouldReturnCorrectProducts_whenLocationIs_LONDON() {
    final List<Product> products = database.getProductsFor(LONDON);

    List<Product> expected =
        asList(
            new Product(NEWS, SKY_NEWS),
            new Product(NEWS, SKY_SPORTS_NEWS),
            new Product(SPORTS, ARSENAL_TV),
            new Product(SPORTS, CHELSEA_TV));

    assertTrue(products.size() == 4);
    assertTrue(expected.containsAll(products));
  }