Beispiel #1
0
        public void SimpleSubtract()
        {
            // [14 CHF] - [12 CHF] == [2 CHF]
            Moneda expected = new Moneda(2, Divisa.CHF);

            Assert.AreEqual(expected, _moneda14CHF.Restar(_moneda12CHF));
        }
Beispiel #2
0
        public void Normalize4()
        {
            // [12 CHF] - {[12 CHF][3 USD]} == [-3 USD]
            Moneda[] s1       = { new Moneda(12, Divisa.CHF), new Moneda(3, Divisa.USD) };
            Monedero ms1      = new Monedero(s1);
            Moneda   expected = new Moneda(-3, Divisa.USD);

            Assert.AreEqual(expected, _moneda12CHF.Restar(ms1));
        }