Exemple #1
0
        public void GetDifferencesBetweenBudgetAndReport_ErrorIfExpenseReportIsInvalid()
        {
            Budget         budget         = fakeBudget.Budget;
            ExpenseReport  expenseReport  = new ExpenseReport();
            BudgetComparer budgetComparer = new BudgetComparer(budget, expenseReport);

            var ex = Assert.Throws <NullReferenceException>(() => budgetComparer.GetDifferencesBetweenReportAndBudget());

            Assert.That(ex.Message, Is.EqualTo("The ExpenseReport does not contain valid data; therefore, it cannot be compared to the budget."));
        }
Exemple #2
0
        public void GetDifferencesBetweenBudgetAndReport_ReturnsValidDifferencesBudgetTest()
        {
            Budget         budget         = fakeBudget.Budget;
            ExpenseReport  expenseReport  = fakeReport.ExpenseReports[4];
            BudgetComparer budgetComparer = new BudgetComparer(budget, expenseReport);

            Budget differencesBetweenBudgetAndReport = budgetComparer.GetDifferencesBetweenReportAndBudget();

            Assert.That(differencesBetweenBudgetAndReport != null);
        }