public List <Income> GetIncomes() { if (_oa.GetIncomes() == null) { return(new List <Income>()); } return(_oa.GetIncomes()); }
public void TestOrmAdapter_Remove1() { OrmAdapter <Test_BudgetDbContext2> _oa = new OrmAdapter <Test_BudgetDbContext2>(_tdb); int IncomeCount = _oa.GetIncomes().Count(); _oa.RemoveIncome(2); int newIncomeCount = _oa.GetIncomes().Count(); _tdb.Database.EnsureDeleted(); Assert.True(newIncomeCount == IncomeCount - 1); }
public void TestOrmAdapter_Get1() { _tdb.Database.EnsureCreated(); OrmAdapter <Test_BudgetDbContext2> _oa = new OrmAdapter <Test_BudgetDbContext2>(_tdb); List <Income> incomes = _oa.GetIncomes(); // _tdb.Database.EnsureDeleted(); Assert.True(incomes.Count != 0); }