Beispiel #1
0
        public void Test_testChg_testing()
        {
            //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(HUF);
            Euro.addCurr(JPY);
            double highGBP = Euro.GetHigh();
            double lowGBP = Euro.GetLow();
            double testGC = Euro.doubChange();
            string testGSC = Euro.testChg();

            //assert
            Assert.AreEqual("HUF", testGSC);
            //Assert.AreEqual(3, Euro.CCList.Count);
        }