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);
        }
예제 #2
0
 private void AssertValidEntity(Expense e)
 {
     Assert.AreEqual(Category, e.Category);
     Assert.AreEqual(Cost, e.Cost);
     Assert.AreEqual(Currenty, e.Currenty);
 }
예제 #3
0
 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);
 }
예제 #4
0
 public void TestCreateExpense()
 {
     var e = new Expense(Category, Cost, Currenty);
     AssertValidEntity(e);
 }