示例#1
0
        public void CreateGameTestBad()
        {
            int roomId = GameBridge.CreateGameRoom(UserId, -1);

            Assert.True(roomId == -1);
            Assert.False(GameBridge.DoesRoomExist(roomId));
            CleanUp(roomId);
        }
示例#2
0
        public void CreateGameWithPrefTestBad()
        {
            RoomId = -1;
            SetupUser1();
            Assert.True(RoomId == -1);
            Assert.False(UserBridge.getUserById(UserId) == null);

            RoomId = GameBridge.CreateGameRoomWithPref(UserId, 10, false, GameMode.PotLimit, 0, 0, -1, 0);
            Assert.True(RoomId == -1);
            Assert.False(GameBridge.DoesRoomExist(RoomId));
            CleanUp(RoomId);
        }
示例#3
0
 public void CreateGameWithPrefTestGood()
 {
     UserId = new Random().Next();
     RegisterUserToDB(UserId);
     RoomId = -1;
     Assert.True(RoomId == -1);
     RoomId = GameBridge.CreateGameRoomWithPref(UserId, 100, true, GameMode.Limit, 2, 8, 0, 10);
     Assert.True(RoomId != -1);
     Assert.True(GameBridge.DoesRoomExist(RoomId));
     Assert.AreEqual(1, GameBridge.GetPlayersInRoom(RoomId).Count);
     Assert.AreEqual(UserId, GameBridge.GetPlayersInRoom(RoomId).First().user.Id());
     CleanUp(RoomId);
 }
示例#4
0
        public void CreateGameTestGood()
        {
            ////RestartSystem();
            RoomId = -1;
            //SetupUser1();
            UserId = new Random().Next();
            RegisterUserToDB(UserId);

            Assert.False(UserBridge.getUserById(UserId) == null);
            RoomId = GameBridge.CreateGameRoom(UserId, 100);
            Assert.True(RoomId != -1);
            Assert.True(GameBridge.DoesRoomExist(RoomId));
            Assert.AreEqual(1, GameBridge.GetPlayersInRoom(RoomId).Count);
            Assert.AreEqual(UserId, GameBridge.GetPlayersInRoom(RoomId).First().user.Id());
            CleanUp(RoomId);
        }