Ejemplo n.º 1
0
        public UpdateExpenseValidatorTests()
        {
            expenseDb = DatabaseSetup.CreateExpenseContext();
            updateExpenseValidator = new UpdateExpenseValidator(expenseDb);

            expenseDb.Expenses.Add(new Expense()
            {
                expenseId = 1
            });

            expenseDb.SaveChanges();
        }
Ejemplo n.º 2
0
        public AddUpdateExpenseValidatorTests()
        {
            expenseDb = DatabaseSetup.CreateExpenseContext();
            addUpdateExpenseValidator = new AddUpdateExpenseValidator(expenseDb);

            // Add an existing expense/expense line
            expenseDb.Expenses.Add(new Expense()
            {
                expenseId = 1
            });

            expenseDb.SaveChanges();
        }
Ejemplo n.º 3
0
        public AddUpdateExpenseLineValidatorTests()
        {
            expenseDb = DatabaseSetup.CreateExpenseContext();
            addUpdateExpenseLineValidator = new AddUpdateExpenseLineValidator(expenseDb);

            expenseDb.Expenses.Add(new Expense()
            {
                expenseId = 1
            });
            expenseDb.ExpenseLines.Add(new ExpenseLine()
            {
                expenseLineId = 1,
                expenseId     = 1
            });

            expenseDb.SaveChanges();
        }
Ejemplo n.º 4
0
 public AddExpenseValidatorTests()
 {
     expenseDb           = DatabaseSetup.CreateExpenseContext();
     addExpenseValidator = new AddExpenseValidator(expenseDb);
 }