示例#1
0
        public void Test_tenSmall_ReturnNameOfSingleCurrencyWithSmallestChangeAgainstEuro()
        {
            //arrange
            BaseCurrency Euro = new BaseCurrency();
            double[] num = { 0.70, 0.68, 0.69, 0.66, 0.69, 0.69, 0.65 };
            Currency GBP = new Currency("GBP", 0.70, num);
            double[] arr = { 1.41, 1.40, 1.39, 1.30, 1.39, 1.39, 1.45 };
            Currency JPY = new Currency("JPY", 1.41, arr);
            double[] hfn = { 310.94, 310.40, 309.78, 309.86, 310.01, 309.99, 310.45 };
            Currency HUF = new Currency("HUF", 310.89, hfn);

            //act
            Euro.addCurr(GBP);
            Euro.addCurr(JPY);
            Euro.addCurr(HUF);
            double bothLow = Euro.GetLow();
            string smallest = Euro.strSmallest();

            //assert
            Assert.AreEqual("GBP", smallest);
        }