Exemple #1
0
        //updates field and db
        public bool SetTotalProfit(int amount)
        {
            lock (padlock)
            {
                userDataProxy.EditUserTotalProfit(id, amount);
                TotalProfit = amount;

                return(true);
            }
        }
Exemple #2
0
        public void EditUserTotalProfitTest()
        {
            UserTable ut = CreateUser(950010252, "EditUserTotalProfitTest()-proxy");

            _userDataProxy.AddNewUser(ConvertToIUser(ut));
            _userDataProxy.EditUserTotalProfit(950010252, 5000000);
            IUser user = _userDataProxy.GetUserById(950010252);

            Assert.AreEqual(user.TotalProfit, 5000000);
            _userDataProxy.DeleteUserById(950010252);
        }