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 Requires_rate()
        {
            Action createQuoteCurrency = () =>
                                         QuoteCurrency.Of(CurrencyCode.Of(USD), null);

            createQuoteCurrency.Should().ThrowExactly <ArgumentException>();
        }
Beispiel #4
0
 private bool Equals(QuoteCurrency other) =>
 Code.Equals(other.Code) &&
 ExchangeRate.Equals(other.ExchangeRate);