public void TestMultiplication() { Dollar five = new Dollar(5); Dollar product = five.times(2); Assert.AreEqual(10, product.amount); Dollar product2 = five.times(3); Assert.AreEqual(15, product2.amount); }
public override bool Equals(object obj) { Dollar dollar = (Dollar)obj; return(_amount == dollar._amount); }