public void GetAnExchangeRate() { MockExchangeRateApi api = new MockExchangeRateApi(); Exchange exchange = new Exchange(api); double rate = exchange.GetRate("GBP", "EUR"); Assert.Equal(1.357, rate); }
internal double Convert(string from, string to, int amount) { double converted = amount * exchange.GetRate(from, to); double valueRoundedUp = Math.Ceiling(converted * 100.0) / 100; return(valueRoundedUp); }