public void AddDollarAmountTest() { DollarAmount thisDollarAmount = new DollarAmount(111); DollarAmount dollarAmountToAdd = new DollarAmount(222); DollarAmount addedAmount = thisDollarAmount.Plus(dollarAmountToAdd); Assert.AreEqual(333, (addedAmount.Dollars * 100) + addedAmount.Cents); }
public void PlusTest() { DollarAmount thisTest = new DollarAmount(90); DollarAmount addingTest = new DollarAmount(10); DollarAmount answer = new DollarAmount(100); DollarAmount result = thisTest.Plus(addingTest); Assert.AreEqual(answer.Dollars, result.Dollars); Assert.AreEqual(answer.Cents, result.Cents); }