@Test public void getLists() { GroceryLists defList = defaultRepository.getLists(); assertEquals("Broken default data?", 3, defList.size()); assertTrue(defList.stream().map(GroceryList::getId).anyMatch(uuid -> Objects.equals(UUID_2, uuid))); GroceryLists emptyList = emptyRepository.getLists(); assertEquals("Empty set not empty?", 0, emptyList.size()); }
public GroceryLists getLists() { return groceryLists; }
Repository { public GroceryLists getLists() { return groceryLists; } }
Repository { public GroceryLists getLists() { return groceryLists; } @Inject  Repository(@Named("datastore") File dataFile, ModelSerializer serializer); }
Repository { public GroceryLists getLists() { return groceryLists; } @Inject  Repository(@Named("datastore") File dataFile, ModelSerializer serializer); UUID createList(GroceryList groceryList); Optional<GroceryList> getList(UUID id); GroceryLists getLists(); boolean updateList(UUID uuid, GroceryList updatedList); boolean deleteList(UUID uuid); }
Repository { public GroceryLists getLists() { return groceryLists; } @Inject  Repository(@Named("datastore") File dataFile, ModelSerializer serializer); UUID createList(GroceryList groceryList); Optional<GroceryList> getList(UUID id); GroceryLists getLists(); boolean updateList(UUID uuid, GroceryList updatedList); boolean deleteList(UUID uuid);  }