public void DeleteContactNumberOnContactNumberService()
        {
            //arrange
            ContactNumberService contactNumberService = new ContactNumberService(MockUnitOfWork.Object);

            //act
            contactNumberService.Delete(testContext.ContactNumber.Id);

            //assert - expected exception
            MockContactNumberRepository.Verify(y => y.Delete(It.IsAny <Guid>()));

            contactNumberService.Dispose();
        }
        public void UpdateContactNumberOnContactNumberService()
        {
            //arrange
            ContactNumberService contactNumberService = new ContactNumberService(MockUnitOfWork.Object);

            //set email to that of another contact in that users Phonebook
            var contactNumberToUpdate = testContext.SingleContact.ContactNumbers.Where((x, i) => i == 0).FirstOrDefault();

            contactNumberToUpdate.TelephoneNumber = contactNumberToUpdate.TelephoneNumber + "01";

            //act
            contactNumberService.Update(contactNumberToUpdate);

            //assert
            MockContactNumberRepository.Verify(y => y.Update(It.IsAny <ContactNumber>()));

            contactNumberService.Dispose();
        }
        public void CreateNewContactOnContactNumberService()
        {
            //arrange
            var contactNumberToCreate = new ContactNumber {
                ContactId = new Guid("81c4763c-b225-4756-903a-750064167813"), Description = "Work", TelephoneNumber = "201803896534"
            };

            ContactNumberService contactNumberService = new ContactNumberService(MockUnitOfWork.Object);

            //act
            Guid contactNumberId = contactNumberService.Create(contactNumberToCreate);

            //assert
            MockContactNumberRepository.Verify(y => y.Create(It.IsAny <ContactNumber>()));
            Assert.IsNotNull(contactNumberId);
            Assert.AreEqual(contactNumberId, contactNumberToCreate.Id);

            contactNumberService.Dispose();
        }