Beispiel #1
0
        public void GetEntityByIdReturnsCalled()
        {
            //Setup
            var mService = new Mock <IClassService>();

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

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

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

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