public void CreateRepository() { CreateRepo(); _exp1 = new Expense(TypeExpense.Car, 34, "euro"); _exp1.UserId = "admin"; _exp2 = new Expense(TypeExpense.Eat, 45, "euro"); _exp2.UserId = "razvan"; Repo.Save(_exp1); Repo.Save(_exp2); }
private void AssertValidEntity(Expense e) { Assert.AreEqual(Category, e.Category); Assert.AreEqual(Cost, e.Cost); Assert.AreEqual(Currenty, e.Currenty); }
public void AddExpense(TypeExpense cat, int cost, string currenty) { var e = new Expense(cat, cost, currenty) {UserId = _user.Username}; _validatorExpense.ValidItem(e); _expRepo.Save(e); }
public void TestCreateExpense() { var e = new Expense(Category, Cost, Currenty); AssertValidEntity(e); }