@Test public void shouldInitialiseEmptyRepository() throws Exception { Inventory inventory = new Inventory(); assertThat(inventory.getAllPurchases()).isEmpty(); assertThat(inventory.getSkuDetails()).isEmpty(); assertThat(inventory.getAllOwnedSkus()).isEmpty(); }
@Test public void testAddPurchase() throws Exception { Inventory inventory = new Inventory(); inventory.addPurchase(mock(Purchase.class)); assertThat(inventory.getAllPurchases()).hasSize(1); }