Esempio n. 1
0
        public void ListPlayerChangeStart1()
        {
            global::NaukaFiszek.Logic.MultiPlayer.ListPlayer <string> listplayer = new NaukaFiszek.Logic.MultiPlayer.ListPlayer <string>();
            listplayer.Register("st2");
            listplayer.Unregister("st2");
            listplayer.Register("st3");
            var change = listplayer.ChangeLogs();

            Assert.IsTrue(change.ChangeLogs[0].Login == "st2" && change.ChangeLogs[0].Status == DTO.Enums.StatusChangedPlayerList.Register);
            Assert.IsTrue(change.ChangeLogs[1].Login == "st2" && change.ChangeLogs[1].Status == DTO.Enums.StatusChangedPlayerList.Leave);
            Assert.IsTrue(change.ChangeLogs[2].Login == "st3" && change.ChangeLogs[2].Status == DTO.Enums.StatusChangedPlayerList.Register);
        }
Esempio n. 2
0
        public void ListPlayer()
        {
            global::NaukaFiszek.Logic.MultiPlayer.ListPlayer <string> listplayer = new NaukaFiszek.Logic.MultiPlayer.ListPlayer <string>();
            listplayer.Register("st1");
            listplayer.Register("st2");
            listplayer.Unregister("st2");
            listplayer.Register("st3");
            var arrey = listplayer.ToArray();

            Assert.IsTrue(arrey[0] == "st1");
            Assert.IsTrue(arrey[1] == "st3");
        }