Example #1
0
        public void GetDrawingPlayer_NoDrawingPlayerShouldReturnNull()
        {
            var lobby   = new LobbyClient();
            var player1 = new PlayerClient("player1");

            lobby.AddPlayer(player1);

            var actualDrawingPlayer = lobby.GetDrawingPlayer();

            Assert.Null(actualDrawingPlayer);
        }
Example #2
0
        public void GetDrawingPlayer_ShouldWork()
        {
            var lobby  = new LobbyClient();
            var player = new PlayerClient("player");

            lobby.AddPlayer(player);
            player.IsConnected = true;
            lobby.SetDrawingPlayer(player.Name);

            var actualDrawingPlayer = lobby.GetDrawingPlayer();

            Assert.Equal(player, actualDrawingPlayer);
        }