Exemplo n.º 1
0
        public void ToMoney_NullCurrency_MissingCurrency()
        {
            MonetaryQuantity noCurrency = new MonetaryQuantity(12, null);
            Money?           money      = MonetaryQuantity.ToMoney(noCurrency);

            Assert.That(money.HasValue, Is.True);
            Assert.That(money.Value.CurrencyCode, Is.EqualTo(CurrencyIsoCode.XXX));
        }
Exemplo n.º 2
0
        public void ToMoney_Null_Null()
        {
            MonetaryQuantity @null = null;

            Assert.That(MonetaryQuantity.ToMoney(@null), Is.Null);
        }
Exemplo n.º 3
0
        public void ToMoney_NullAmount_Null()
        {
            MonetaryQuantity noAmount = new MonetaryQuantity(null, "XXX");

            Assert.That(MonetaryQuantity.ToMoney(noAmount), Is.Null);
        }