Пример #1
0
        public void UserAddToRoomAsSpectatorAllreadyPlayerInRoomTestBad()
        {
            UserId = SetupUser1();
            int roomId = new Random().Next();

            CreateGame(roomId, UserId, 100, true, GameMode.NoLimit, 2, 8, 0, 10);
            Assert.False(UserBridge.AddUserToGameRoomAsSpectator(UserId, roomId));
            CleanUp(roomId);
        }
Пример #2
0
        public void UserAddToRoomAsSpectatorGood()
        {
            int roomId = CreateGameWith3Users();
            int id     = new Random().Next();

            RegisterUser(id, _user2Name + id, _user2Pw, _user2EmailGood);
            Assert.IsFalse(UserBridge.AddUserToGameRoomAsSpectator(id, roomId));
            CleanUp(roomId);
            UserBridge.DeleteUser(id);
        }
Пример #3
0
        public void UserAddToRoomAsSpectatorNonExsistantRoomTestSad()
        {
            int id = new Random().Next();

            RegisterUser(id, _user2Name + id, _user2Pw, _user2EmailGood);
            int nonExsistanRoom = new Random().Next();

            Assert.IsFalse(UserBridge.AddUserToGameRoomAsSpectator(id, nonExsistanRoom));
            CleanUp(nonExsistanRoom);
            UserBridge.DeleteUser(id);
        }