public void Is_successfully_created_when_both_code_and_exchange_rate_are_provided() { Action createQuoteCurrency = () => QuoteCurrency.Of(CurrencyCode.Of(USD), CurrencyExchangeRate.Of(BTC_to_USD)); createQuoteCurrency.Should().NotThrow(); }
public void Requires_code() { Action createQuoteCurrency = () => QuoteCurrency.Of(null, CurrencyExchangeRate.Of(BTC_to_USD)); createQuoteCurrency.Should().ThrowExactly <ArgumentException>(); }
public void Is_successfully_created_from_a_non_zero_positive_value() { Action createCurrencyExchangeRate = () => CurrencyExchangeRate.Of(0.5M); createCurrencyExchangeRate.Should().NotThrow(); }
public void Requires_value_higher_than_zero(decimal value) { Action createCurrencyExchangeRate = () => CurrencyExchangeRate.Of(value); createCurrencyExchangeRate.Should().ThrowExactly <ArgumentException>(); }