Пример #1
0
        public void StopAction_ReturnsAcceptedResult()
        {
            var anarchyManager = Substitute.For <IAnarchyManagerNew>();
            var logger         = Substitute.For <ILogger <Anarchy.Controllers.AnarchyController> >();
            var sut            = new Anarchy.Controllers.AnarchyController(anarchyManager, logger);

            //Act
            var result = sut.StopAction(actionType);

            //Assert
            result.Should().BeOfType <AcceptedResult>();
        }
Пример #2
0
        public void StopAction_CallsAnarchyManager()
        {
            //arrange
            var anarchyManager = Substitute.For <IAnarchyManagerNew>();
            var logger         = Substitute.For <ILogger <Anarchy.Controllers.AnarchyController> >();
            var sut            = new Anarchy.Controllers.AnarchyController(anarchyManager, logger);

            //Act
            sut.StopAction(actionType);

            //Assert
            anarchyManager.Received(1).StopAction(actionType);
        }