Esempio n. 1
0
        public void RetrieveConsultationServiceTest()
        {
            //Arrange
            Consultation Consultation = ObjectMother.GetConsultation();
            //Fake do repositório
            var repositoryFake = new Mock <IConsultationRepository>();

            repositoryFake.Setup(r => r.Get(1)).Returns(Consultation);

            IConsultationService service = new ConsultationService(repositoryFake.Object);

            //Action
            var ConsultationFake = service.Retrieve(1);

            //Assert
            repositoryFake.Verify(r => r.Get(1));
            Assert.IsNotNull(ConsultationFake);
        }