public void CanGetAllEntries() { var entryRepo = new JournalRepo(); var entryToInsert = new JournalEntry("CanGetAllEntries", "test title", "Ttiamus"); entryRepo.CreateEntry(entryToInsert).Wait(); var getAllEntriesTask = entryRepo.GetEntries(); var entries = getAllEntriesTask.Result.ToList(); Assert.IsTrue(entries.Count > 0); }
public void CanGetTopEntries() { var entryRepo = new JournalRepo(); var entryToInsert = new JournalEntry("CanGetTopEntriesTest", "test title", "Ttiamus"); for (var i = 0; i <= 5; i++) { entryRepo.CreateEntry(entryToInsert).Wait(); } var getTopEntriesTask = entryRepo.GetEntries("Ttiamus", 0); var entries = getTopEntriesTask.Result.ToList(); Assert.IsTrue(entries.Count == 5); }