Пример #1
0
        public void GetContactById()
        {
            //Arrange
            var mockUnitOfWork = new Mock <IUnitOfWork>();

            //Esperamos que se llame al metodo Get del ContactRepository con un int
            mockUnitOfWork.Setup(un => un.ContactRepository.GetByID(It.IsAny <int>()));

            ContactValidator contactValidator = new ContactValidator(mockUnitOfWork.Object);
            //Act

            Contact returnedContact = contactValidator.GetContact("5");

            //Assert
            //mockUnitOfWork.VerifyAll();
        }