Ejemplo n.º 1
0
        public void RetrieveCovenantServiceTest()
        {
            //Arrange
            Covenant Covenant = ObjectMother.GetCovenant();
            //Fake do repositório
            var repositoryFake = new Mock<ICovenantRepository>();
            repositoryFake.Setup(r => r.Get(1)).Returns(Covenant);

            ICovenantService service = new CovenantService(repositoryFake.Object);

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

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