private void RegisterUser(int userId, string name, string pass, string mail) { if (!UserBridge.IsThereUser(userId)) { UserBridge.RegisterUser(userId, name, pass, mail); Users.Add(userId); } else if (!UserBridge.IsUserLoggedIn(userId)) { UserBridge.LoginUser(name, pass); } }
public void ListActiveGamesTestGood() { //delete all users and games, register user1 // //RestartSystem(); SetupUser1(); RoomId = -1; Assert.True(RoomId == -1); Assert.True(UserBridge.IsThereUser(UserId)); RoomId = GameBridge.CreateGameRoom(UserId, 10); RegisterUser2(); Assert.True(UserBridge.IsThereUser(UserId)); Assert.True(UserBridge.IsThereUser(_userId2)); Assert.GreaterOrEqual(GameBridge.ListAvailableGamesByUserRank(_userId2).Count, 1); CleanUp(RoomId); }