Esempio n. 1
0
        public void CanGetAllEntries()
        {
            JournalService entryService = new JournalService();

            var entryToInsert = new JournalEntry("CanGetAllEntries", "test title", "Ttiamus");
            entryService.CreateEntry(entryToInsert).Wait();

            var getAllEntryTask = entryService.GetEntries();
            var entries = getAllEntryTask.Result.ToList();
            Assert.IsTrue(entries.Count > 0);
        }
Esempio n. 2
0
        public void CanGetTopEntries()
        {
            JournalService entryService = new JournalService();

            var entryToInsert = new JournalEntry("CanGetAllEntries", "test title", "Ttiamus");

            for (var i = 0; i <= 5; i++)
            {
                entryService.CreateEntry(entryToInsert).Wait();
            }

            var getAllEntryTask = entryService.GetEntries("Ttiamus", 0);
            var entries = getAllEntryTask.Result.ToList();
            Assert.IsTrue(entries.Count == 5);
        }