Esempio 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));
        }
Esempio 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);
        }