/// <summary> /// /// </summary> public void TestBagMultiply() { // {[12 CHF][7 USD]} *2 == {[24 CHF][14 USD]} Money[] bag = { new Money(24, "CHF"), new Money(14, "USD") }; MoneyBag expected = new MoneyBag(bag); Assertion.AssertEquals(expected, fMB1.Multiply(2)); Assertion.AssertEquals(fMB1, fMB1.Multiply(1)); Assertion.Assert(fMB1.Multiply(0).IsZero); }
public void BagMultiply() { // {[12 CHF][7 USD]} *2 == {[24 CHF][14 USD]} Money[] bag = { new Money(24, "CHF"), new Money(14, "USD") }; MoneyBag expected = new MoneyBag(bag); Assert.AreEqual(expected, fMB1.Multiply(2)); Assert.AreEqual(fMB1, fMB1.Multiply(1)); Assert.IsTrue(fMB1.Multiply(0).IsZero); }