public void EnsureCurrencyAddsRealCurrencyForCodeThatExists() { var service = new TestMoneyService(); var amount = service.EnsureCurrency(new Amount(42, new Currency("My Fake", "My Fake", "X", "AMD"))); Assert.Equal(42, amount.Value); Assert.Equal(service.GetCurrency("AMD"), amount.Currency); }
public void CreateMakesAmountWithCurrency() { var service = new TestMoneyService(); var amount = service.Create(42, "AMD"); Assert.Equal(42, amount.Value); Assert.Equal(service.GetCurrency("AMD"), amount.Currency); }