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)); }
public void ToMoney_Null_Null() { MonetaryQuantity @null = null; Assert.That(MonetaryQuantity.ToMoney(@null), Is.Null); }
public void ToMoney_NullAmount_Null() { MonetaryQuantity noAmount = new MonetaryQuantity(null, "XXX"); Assert.That(MonetaryQuantity.ToMoney(noAmount), Is.Null); }