Exemple #1
0
        public void Should_ReduceMoney_DifferentCurrency()
        {
            Bank bank = new Bank();

            bank.AddRate("CHF", "USD", 2);
            Assert.AreEqual(2, actual: bank.Rate(CHF, USD));
        }
Exemple #2
0
        public override Money Reduce(Bank bank, string to)
        {
            int rate = bank.Rate(Currency, to);

            return(new Money(Amount / rate, to));
        }
Exemple #3
0
        public void Should_Rate_1_When_Same()
        {
            Bank bank = new Bank();

            Assert.AreEqual(1, actual: bank.Rate(USD, USD));
        }