Exemplo n.º 1
0
        public void GetPlayerByName_NullPlayerShouldThrowException()
        {
            var lobby  = new LobbyClient();
            var player = new PlayerClient("player");

            lobby.AddPlayer(player);

            Assert.Throws <ArgumentException>(() => lobby.GetPlayerByName(null));
        }
Exemplo n.º 2
0
        public void GetPlayerByName_SinglePlayerShouldWork()
        {
            var lobby  = new LobbyClient();
            var player = new PlayerClient("player");

            lobby.AddPlayer(player);

            var actualPlayer = lobby.GetPlayerByName("player");

            Assert.Equal(player, actualPlayer);
        }