Beispiel #1
0
 public void UpdateAStatus()
 {
     Status status = _db.Statuses.FirstOrDefault();
     status.StatusName = "Updated Name";
     _db.Update(status);
     _db.SaveChanges();
     Assert.Equal("Updated Name", _db.Statuses.FirstOrDefault().StatusName);
 }
Beispiel #2
0
        public void Case05()
        {
            BudgetCode tempBudgetCode = _db.BudgetCodes.Where(x => x.BudgetCodeName == "CS Budget").ToList().First();

            // decimal CSBudget = _db.BudgetCodes.Where(x => x.BudgetCodeName == "CS Budget").ToList().First().TotalAmount;
            // tempBudgetCode.TotalAmount += 2000;
            _db.Update(tempBudgetCode);
            _db.SaveChanges();
            //Assert.Equal(CSBudget + 2000, _db.BudgetCodes.Where(x => x.BudgetCodeName == "CS Budget").ToList().First().TotalAmount);
        }