public void TestLowestDeposit() { BudgetSheet sheet = new BudgetSheet(); sheet.DepositMoney(5.0M); sheet.DepositMoney(400.0M); BudgetActivity testResult = sheet.ShowAccountActivity(); Assert.AreEqual(0, testResult.Low); }
public void TestHighestDeposit() { //27Add a reference to the Budget_Book //28 change the BudgetSheet to public //29 Write the unit tests. BudgetSheet sheet = new BudgetSheet(); sheet.DepositMoney(100.0M); sheet.DepositMoney(400.0M); BudgetActivity testResult = sheet.ShowAccountActivity(); Assert.AreEqual(400.0M, testResult.High); }
public void TestAverageDeposit() { //27Add a reference to the Budget_Book //28 change the BudgetSheet to public //29 Write the unit tests. BudgetSheet sheet = new BudgetSheet(); //sheet.DepositMoney(10.0M); //sheet.DepositMoney(10.0M); sheet.DepositMoney(10.3M); sheet.DepositMoney(10.3M); sheet.DepositMoney(10.7M); BudgetActivity testResult = sheet.ShowAccountActivity(); // Assert.AreEqual(10.0M, testResult.Average); //29Problem: imperfect average. Assert.AreEqual(10.0M, testResult.Average); //Assert.AreEqual(10.433333333M, testResult.Average, 0.01M); }