Skip to content

Instantly share code, notes, and snippets.

@rchatley
Created October 26, 2021 10:25
Show Gist options
  • Save rchatley/4614756ffcf87825dc48ab3468f2b5fe to your computer and use it in GitHub Desktop.
Save rchatley/4614756ffcf87825dc48ab3468f2b5fe to your computer and use it in GitHub Desktop.
package com.iteratrlearning.collections.examples._4_sets;
import com.iteratrlearning.collections.examples.ProductFixtures;
import org.junit.Test;
import static com.iteratrlearning.collections.examples.ProductFixtures.*;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertThat;
public class ProductCatalogueTest {
@Test
public void shouldOnlyHoldUniqueProducts() {
ProductCatalogue catalogue = new ProductCatalogue();
catalogue.isSuppliedBy(bobs);
catalogue.isSuppliedBy(kates);
assertThat(catalogue, containsInAnyOrder(door, floorPanel, window));
}
// @Test
// public void shouldFindLightVanProducts() {
//
// ProductCatalogue catalogue = new ProductCatalogue();
//
// catalogue.isSuppliedBy(bobs);
// catalogue.isSuppliedBy(kates);
//
// assertThat(catalogue.lightVanProducts(), containsInAnyOrder(window));
// }
//
// @Test
// public void shouldFindHeavyVanProducts() {
//
// ProductCatalogue catalogue = new ProductCatalogue();
//
// catalogue.isSuppliedBy(bobs);
// catalogue.isSuppliedBy(kates);
//
// assertThat(catalogue.heavyVanProducts(), containsInAnyOrder(door, floorPanel));
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment