using System;
using CurrencyExchangeLib;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CurrencyExchangeTestLib
{
    [TestClass]
    public class CurrencyExchangeTest
    {
        const double DELTA = 0.000001;
        CurrencyExchange currencyExchange;

        [TestInitialize]
        public void Init()
        {
            currencyExchange = new CurrencyExchange();
        }

        [TestMethod]
        public void Canary()
        {
            Assert.IsTrue(true);
        }

        [TestMethod]
        public void MarkDown()
        {
            Assert.AreEqual(98.0, currencyExchange.MarkDown(100), DELTA);
        }

        [TestMethod]
        public void GetRateNoVendors()
        {
            var result = new Tuple<String, double>("", 0.0);
            Assert.AreEqual(result, currencyExchange.GetRate("GBP"));
        }
    }
}
