public void ReturnNoResultsIfSearchPhraseIsNull()
        {
            var contactsController = new ContactsController(_mockDbContext.Object);

            var result = contactsController.Search(null).Result;

            Assert.AreEqual(0, result.Count());
        }
        public void ReturnOneResultIfSearchPhraseIsPrincess()
        {
            var phrase = "Princess";
            var contactsController = new ContactsController(_mockDbContext.Object);

            var result = contactsController.Search(phrase).Result;

            Assert.AreEqual(1, result.Count());
        }
        public void OrderResultsAlphabetically()
        {
            var phrase = "a";
            var contactsController = new ContactsController(_mockDbContext.Object);

            var result = contactsController.Search(phrase).Result.ToList();

            Assert.AreEqual("Darth", result.First().FirstName);
            Assert.AreEqual("Leia", result.Skip(1).First().FirstName);
            Assert.AreEqual("Luke", result.Skip(2).First().FirstName);
        }