public void GetNewExchangeRate() { // Arrange const double expected = 5.25; _sut.ChangeExchangeRate(5.25); // Act var actual = _sut.ExchangeRate; // Assert Assert.AreEqual(expected, actual, "Ny valuta kurs"); }
public static void Main(string[] args) { var exchangeRate = ParseExchangeRate(CurrencyConverter.ExchangeRate); var exchange = ParseExchange(); var amount = ParseAmount(); CurrencyConverter.ChangeExchangeRate(exchangeRate); var exchangedAmount = exchange.StartsWith('k') ? CurrencyConverter.KrToEuro(amount) : CurrencyConverter.EuroToKr(amount); var exchangeType = exchange.StartsWith('k') ? "Euro" : "Kr."; Console.WriteLine($"Dit beløb efter veksling er: {exchangedAmount} {exchangeType}"); }