Ejemplo n.º 1
0
        private void CreateRoomLoop1()
        {
            string pass  = "******";
            string email = "*****@*****.**";
            string name  = "99999" + Thread.CurrentThread.ManagedThreadId.ToString();
            int    id    = UserBridge.RegisterUser(name, pass, email);

            Assert.True(id != -1);
            Assert.True(UserBridge.LoginUser(name, pass));
            int        RoomID;
            List <int> roomIDS = new List <int>();

            for (int i = 8850000; i < 8850100; i++)
            {
                RoomID = GameBridge.CreateGameRoom(id, 100);
                roomIDS.Add(RoomID);
            }

            for (int i = 0; i < roomIDS.Count; i++)
            {
                GameBridge.DoAction(id, CommunicationMessage.ActionType.Leave, 0, roomIDS[i]);
            }

            Assert.True(UserBridge.LogoutUser(id));
            UserBridge.DeleteUser(name, pass);
        }
Ejemplo n.º 2
0
        public void UserLogoutTestGood()
        {
            int id = SetupUser1();

            Assert.True(UserBridge.LogoutUser(id));
            UserBridge.DeleteUser(id);
        }
Ejemplo n.º 3
0
        public void UserLogoutTestSad()
        {
            UserId         = new Random().Next();
            User1Name      = "orelie" + UserId;
            User1Pw        = "goodPw1234";
            UserEmailGood1 = "*****@*****.**";

            Assert.False(UserBridge.LogoutUser(UserId));
        }
Ejemplo n.º 4
0
        private void RegisterAndLoginLoop()
        {
            string pass  = "******";
            string email = "*****@*****.**";
            string name  = Thread.CurrentThread.ManagedThreadId.ToString();
            int    id;

            for (int i = 6850000; i < 6850100; i++)
            {
                id = UserBridge.RegisterUser(i + name, pass, email);
                Assert.True(id != -1);
                Assert.True(UserBridge.LoginUser(i + name, pass));
                Assert.True(UserBridge.LogoutUser(id));
                UserBridge.DeleteUser(i + name, pass);
            }
        }
Ejemplo n.º 5
0
 public void UserLogoutTestBad()
 {
     Assert.False(UserBridge.LogoutUser(-1));
 }