Beispiel #1
0
        public void SearchPhoneBookTest()
        {
            try
            {
                PhoneBookService service = new PhoneBookService(new GenericRepository <PhoneBook, int>(), new GenericRepository <Entry, int>());
                var phoneBook            = service.SearchPhoneBook("Grant").Result;

                Assert.IsNotNull(phoneBook);
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Beispiel #2
0
        public async Task DeleteEntry()
        {
            try
            {
                PhoneBookService service = new PhoneBookService(new GenericRepository <PhoneBook, int>(), new GenericRepository <Entry, int>());

                var phoneBooks = await service.SearchPhoneBook("Van der Merwe");

                foreach (var phoneBook in phoneBooks)
                {
                    await service.DeletePhoneBookEntry(phoneBook);
                }

                Assert.IsTrue(true);
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }