public void MatchingOrchestrator_ValidNewSchedule(string anarchyType)
        {
            //arrange
            var orchestrator = Get.MotherFor.MockAnarchyActionOrchestrator
                               .OrchestratorWithScheduleNamed("testAnarchyType").Build();
            var sut = new AnarchyManagerNew(new [] { orchestrator });

            //act
            sut.StartSchedule(anarchyType);

            //assert
            orchestrator.Received(1).Start();
        }
        public void NoMatchingOrchestrator(string anarchyType)
        {
            //arrange
            var orchestrator = Get.MotherFor.MockAnarchyActionOrchestrator
                               .OrchestratorWithScheduleNamed("testAnarchyType").Build();
            var sut = new AnarchyManagerNew(new [] { orchestrator });

            //act
            var exception = Assert.Catch(() => sut.StartSchedule(anarchyType));

            //assert
            exception.Should().BeOfType <AnarchyActionNotFoundException>();
            orchestrator.Received(0).Start();
        }
        public void SelectsFirstMatchingOrchestrator(string firstActionName, string secondActionName, int firstCount, int secondCount)
        {
            //arrange
            var orchestrator1 = Get.MotherFor.MockAnarchyActionOrchestrator
                                .OrchestratorWithScheduleNamed(firstActionName).Build();
            var orchestrator2 = Get.MotherFor.MockAnarchyActionOrchestrator
                                .OrchestratorWithScheduleNamed(secondActionName).Build();
            var sut = new AnarchyManagerNew(new [] { orchestrator1, orchestrator2 });

            //act
            sut.StartSchedule("firstActionName");

            //assert
            orchestrator1.Received(firstCount).Start();
            orchestrator2.Received(secondCount).Start();
        }