예제 #1
0
        public void CzceHolidayTransactionContractListTest()
        {
            DateTime date        = new DateTime(2015, 1, 1);
            string   webText     = TestUtility.RetrieveWebPage(date, new CzceDailyTransactionCrawler());
            var      parser      = new CzceTransactionParser();
            var      listFromWeb = parser.GetContractList(webText, date);

            Assert.IsTrue(listFromWeb.Count == 0);
        }
예제 #2
0
        public void CzceTransactionContractListTest()
        {
            DateTime date        = new DateTime(2014, 1, 6);
            string   webText     = TestUtility.RetrieveWebPage(date, new CzceDailyTransactionCrawler());
            var      parser      = new CzceTransactionParser();
            var      listFromWeb = parser.GetContractList(webText, date);

            var testData = new List <ContractTransactionInfo>();

            testData.Add(new ContractTransactionInfo(date, "czce", "cf", "401", 19080, 19080, 19080, 19080, 19080, 582, 896));
            testData.Add(new ContractTransactionInfo(date, "czce", "wH", "411", 0, 0, 0, 0, 2742, 0, 6));
            testData.Add(new ContractTransactionInfo(date, "czce", "TA", "405", 7210, 7212, 7136, 7146, 7174, 238492, 422160));
            testData.Add(new ContractTransactionInfo(date, "czce", "pm", "409", 2551, 2551, 2551, 2551, 2551, 2, 42));

            ValidateValues(testData, listFromWeb);
        }