예제 #1
0
파일: User.cs 프로젝트: shoferb/OYAOB
        //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);
            }
        }
예제 #2
0
        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);
        }