Beispiel #1
0
        public void ServerSideFactoryRemovesPlayerFromPlayerListWhenDeletingClient()
        {
            ServerSideClientFactory serverClientFactory = new ServerSideClientFactory(clientFactoryDelegate, playerList);
            Client client = serverClientFactory.MakeNewClient(300);

            serverClientFactory.DeleteClient(client);

            Assert.AreEqual(0, playerList.Players.Count);
        }
Beispiel #2
0
        public void ServerSideFactoryAddsPlayersToPlayerList()
        {
            ServerSideClientFactory serverClientFactory = new ServerSideClientFactory(clientFactoryDelegate, playerList);

            Client newClient = serverClientFactory.MakeNewClient(300);

            Assert.IsTrue(playerList.Players.Contains(newClient.Player));
            Assert.AreEqual(300, newClient.ID);
        }