コード例 #1
0
        public void Should_ReduceMoney_DifferentCurrency()
        {
            Bank bank = new Bank();

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

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

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