public void CreateGameTestBad() { int roomId = GameBridge.CreateGameRoom(UserId, -1); Assert.True(roomId == -1); Assert.False(GameBridge.DoesRoomExist(roomId)); CleanUp(roomId); }
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); }
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); }
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); }