public void PlayerShouldNotJoinToOvercrowdedGame() { var game = GameMocks.Overcrowded(); var processor = new JoinEventProcessor(game.Object, new MockLogger()); var errorEvent = (ErrorEvent)processor.Process(new JoinEvent()); Assert.Equal(Constants.Messages.GameOvercrowded, errorEvent.Message); }
public void PlayerShouldJoin() { var game = GameMocks.Joinable(); var processor = new JoinEventProcessor(game.Object, new MockLogger()); var joinedEvent = (PlayerJoinedEvent)processor.Process(new JoinEvent()); Assert.NotNull(joinedEvent.Player); }