public void SubscribeToEvent_SetGameTimeShouldFireEvent() { //Arrange EventMediator.GetEventMediator().ClockChange += ClockControllerTests_ClockChange; //Act clockController.SetGameTime(new GameTime()); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_MethodShouldBeCalled() { //Arrange EventMediator.GetEventMediator().PossessionChange += PossessionControllerTests_PossessionChange; //Act _possessionController.ChangePossession(); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_DecrementShouldFireEvent() { //Arrange EventMediator.GetEventMediator().ClockChange += ClockControllerTests_ClockChange; //Act clockController.DecrementGameTimeByTenth(); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_SetGameScoreShouldFire() { //Arrange EventMediator.GetEventMediator().ScoreChange += ScoreControllerTests_ScoreChange; //Act scoreController.SetGameScore(new GameScore()); //Assert Assert.IsTrue(methodWasCalled); }
private void SubscribeToEvents() { EventMediator mediator = EventMediator.GetEventMediator(); mediator.ClockChange += ControllerForm_ClockChange; mediator.FoulsChange += ControllerForm_FoulsChange; mediator.ScoreChange += ControllerForm_ScoreChange; mediator.TimeoutChange += ControllerForm_TimeoutChange; mediator.PossessionChange += ControllerForm_PossessionChange; mediator.PeriodChange += ControllerForm_PeriodChange; }
public void SubscribeToEvent_ScoreEventShouldFire() { //Arrange EventMediator.GetEventMediator().ScoreChange += ScoreControllerTests_ScoreChange; //Act scoreController.ScoreEvent(Team.Away, 0); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_IncrementShouldFireEvent() { //Arrange EventMediator.GetEventMediator().FoulsChange += FoulControllerTests_FoulsChanged; //Act _foulController.IncrementFouls(Team.Away); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_ResetShouldFireEvent() { //Arrange EventMediator.GetEventMediator().FoulsChange += FoulControllerTests_FoulsChanged; //Act _foulController.ResetAllFouls(); //Assert Assert.IsTrue(methodWasCalled); }
public void SubscribeToEvent_SetGameTimeShouldFireEvent() { //Arrange EventMediator.GetEventMediator().TimeoutChange += TimeoutControllerTests_ClockChange; //Act timeoutController.DecrementTimeout(); //Assert Assert.IsTrue(methodWasCalled); }
private void SubscribeToEvents() { EventMediator mediator = EventMediator.GetEventMediator(); mediator.ClockChange += ControllerForm_ClockChange; mediator.FoulsChange += ControllerForm_FoulsChange; mediator.ScoreChange += ControllerForm_ScoreChange; mediator.TimeoutChange += ControllerForm_TimeoutChange; mediator.PossessionChange += ControllerForm_PossessionChange; mediator.PeriodChange += ControllerForm_PeriodChange; mediator.GameClockExpire += ControllerForm_GameClockExpire; mediator.TimeoutClockExpire += ControllerForm_TimeoutClockExpire; mediator.GameClockSounding += ControllerForm_GameClockSounding; mediator.GameClockSounded += ControllerForm_GameClockSounded; }
private static void FireScoreChangedEventHandler() { EventMediator.GetEventMediator().OnScoreChange(_CurrentScore); }