public void ChangeConnectionForPlayer_NonexistentPlayerPassed_ThrowError() { var lobby = new LobbyClient(); var player = new PlayerClient("player"); lobby.AddPlayer(player); Assert.Throws <ArgumentException>(() => lobby.ChangeConnectionForPlayer("nonexistent", true)); }
public void ChangeConnectionForPlayer_ShouldWork(bool newState) { var lobby = new LobbyClient(); var player = new PlayerClient("player"); lobby.AddPlayer(player); lobby.ChangeConnectionForPlayer("player", newState); Assert.Equal(newState, player.IsConnected); }