예제 #1
0
        public void TestLeer()
        {
            IRecetaRepository RecetaRepository = new RecetaRepository();
            IRecetaService    sut = new RecetaService(RecetaRepository);

            sut.Lee("a");
        }
        public void TestLeer()
        {
            var            MockRecetaRepository = new Mock <IRecetaRepository>();
            IRecetaService sut = new RecetaService(MockRecetaRepository.Object);

            sut.Lee("");
            MockRecetaRepository.Verify(recetaRepository => recetaRepository.Lee(It.IsAny <String>()), Times.Once);
        }