Ejemplo n.º 1
0
        public void DeleteEntityReturnsCalled()
        {
            //Setup
            var mService = new Mock <ITeacherService>();

            mService.Setup(mock => mock.DeleteEntity(It.IsAny <int>()));

            //Action
            var controller = new TeacherController(mService.Object);

            controller.DeleteEntityById(It.IsAny <int>());

            //Assert
            mService.Verify(mock => mock.DeleteEntity(It.IsAny <int>()), Times.Once);
        }