Пример #1
0
        //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 EditUserNumOfGamesPlayedTest()
        {
            UserTable ut = CreateUser(959511110, "EditUserNumOfGamesPlayedTest()-proxy");

            _userDataProxy.AddNewUser(ConvertToIUser(ut));
            _userDataProxy.EditUserNumOfGamesPlayed(959511110, 300);
            IUser user = _userDataProxy.GetUserById(959511110);

            Assert.AreEqual(user.GetNumberOfGamesUserPlay(), 300);
            _userDataProxy.DeleteUserById(959511110);
        }