public void CheckSavings_01_ChecksSuccessfulWithdraw_ReturnTrue() { bc.WithdrawEachExpense(BudgetCalculator.listOfEconomy); var actual = Saving.CheckSavings(BudgetCalculator.savingsList); Assert.IsTrue(actual); }
public void WithdrawEachExpense_01_CheckIfWithdrawIsSucessfull_ReturnsEqual() { var expected = Withdraw(); var actual = bc.WithdrawEachExpense(BudgetCalculator.listOfEconomy); Assert.AreEqual(expected, actual); }
public void WithdrawEachExpense_05_CheckIfListPropertyIsEmpty_ReturnEqual() { var testList = new List <IAccount> { new Expense(), new Income() }; var bc = new BudgetCalculator(); BudgetCalculator.totalIncome.Money = 0; var actual = bc.WithdrawEachExpense(testList); var expected = 0; Assert.AreEqual(expected, actual); }
public void LogAll_01_CheckIfItemAddsToList() { var bc = new BudgetCalculator(); bc.SeparateIncomeAndExpense(BudgetCalculator.listOfEconomy); bc.WithdrawEachExpense(BudgetCalculator.listOfEconomy); Saving.CheckSavings(BudgetCalculator.savingsList); log.listToPrint.Add("(test)"); log.LogAll(); var actual = log.listToPrint.Find(e => e.Contains("(test)")); var expected = "(test)"; Assert.AreEqual(actual, expected); log.listToPrint.Clear(); }