public void TestMultiplication() { Dollar five = new Dollar(5); Dollar result = five.times(2); Assert.Equal(10, result.Amount); }
public void TestMoreThanOneMultiplication() { Dollar five = new Dollar(5); Dollar product = five.times(2); Assert.Equal(10, product.Amount); product = five.times(3); Assert.Equal(15, product.Amount); }
public override bool Equals(object obj) { Dollar dollar = (Dollar)obj; return(this.Amount == dollar.Amount); }