public void StopAllActions_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.StopAllActions(); //Assert result.Should().BeOfType <AcceptedResult>(); }
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.StopAllActions(); //Assert anarchyManager.Received(1).StopAllActions(); }