Example #1
0
        public void Convert_InvalidTest()
        {
            FinanceManager financeManager = new FinanceManager();

            double    amount   = 1000;
            ICurrency currency = FinantialDB.Currency["EUR"];

            Assert.Throws <ArgumentNullException>(() => financeManager.Convert(null, amount));
        }
Example #2
0
        public void Convert_ValidTest()
        {
            FinanceManager financeManager = new FinanceManager();

            double    amount        = 1000;
            ICurrency currency      = FinantialDB.Currency["EUR"];
            double    convertAmount = financeManager.Convert(currency, amount);

            Assert.AreEqual(convertAmount, amount * currency.Value);
        }