public void CreateNewContactNumberForNoneExistentContactOnContactNumberService()
        {
            //arrange
            var mockContactNumberRepository = new Mock<IContactNumberRepository>();
            var mockContactService = new Mock<IContactService>();

            var contactNumberToCreate = new ContactNumber
            {
                ContactId = new Guid("720d966c-5685-45c2-b63d-1312620e1d11"),
                Description = "Work",
                TelephoneNumber = "297724563901"
            };

            mockContactNumberRepository.Setup(x => x.GetAll()).Returns(_contactNumbers);
            mockContactService.Setup(x => x.Get(It.IsAny<Guid>())).Returns(() => null);

            ContactNumberService contactNumberService = new ContactNumberService(mockContactNumberRepository.Object, mockContactService.Object);

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

            //assert

            contactNumberService.Dispose();
        }
        public void CreateContactNumberForContactWithTelephoneNumberOfExistingContactNumberOnContactNumberService()
        {
            //arrange
            var mockContactNumberRepository = new Mock<IContactNumberRepository>();
            var mockContactService = new Mock<IContactService>();

            ContactNumber contactNumberToCreate = new ContactNumber
            {
                ContactId = new Guid("81c4763c-b225-4756-903a-750064167813"),
                Description = "Work",
                TelephoneNumber = "297724563901"
            };

            mockContactNumberRepository.Setup(x => x.GetAll()).Returns(_contactNumbers);
            mockContactService.Setup(x => x.Get(It.IsAny<Guid>())).Returns(_contact);

            ContactNumberService contactNumberService = new ContactNumberService(mockContactNumberRepository.Object, mockContactService.Object);

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

            //assert - expect excpetion

            contactNumberService.Dispose();
        }
        public void CreateNewContactOnContactNumberService()
        {
            //arrange
            var mockContactNumberRepository = new Mock<IContactNumberRepository>();
            var mockContactService = new Mock<IContactService>();

            var contactNumberToCreate = new ContactNumber { ContactId = new Guid("81c4763c-b225-4756-903a-750064167813"), Description = "Work", TelephoneNumber = "201803896534" };

            mockContactNumberRepository.Setup(x => x.GetAll()).Returns(_contactNumbers);
            mockContactService.Setup(x => x.Get(It.IsAny<Guid>())).Returns(_contact);

            ContactNumberService contactNumberService = new ContactNumberService(mockContactNumberRepository.Object, mockContactService.Object);

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

            //assert
            mockContactNumberRepository.Verify(y => y.Create(It.IsAny<ContactNumber>()));
            Assert.IsNotNull(contactNumberId);

            contactNumberService.Dispose();
        }