//inc num of games play public bool IncGamesPlay() { lock (padlock) { userDataProxy.EditUserNumOfGamesPlayed(id, unknowGamesPlay + 1); unknowGamesPlay++; if (unknowGamesPlay > 10 && league == LeagueName.Unknow) { league = LeagueName.E; userDataProxy.EditUserLeagueName(id, LeagueName.E); } return(true); } }
public void EditUserLeagueNameTest() { UserTable ut = CreateUser(858566222, "EditUserLeagueNameTest()-proxy"); _userDataProxy.AddNewUser(ConvertToIUser(ut)); _userDataProxy.EditUserLeagueName(858566222, LeagueName.B); IUser user = _userDataProxy.GetUserById(858566222); Assert.AreEqual(user.GetLeague(), LeagueName.B); _userDataProxy.DeleteUserById(858566222); }