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