Пример #1
0
        public void DceHolidayTransactionContractListTest()
        {
            DateTime date        = new DateTime(2015, 1, 1);
            string   webText     = TestUtility.RetrieveWebPage(date, new DceDailyTransactionCrawler());
            var      parser      = new DceTransactionParser();
            var      listFromWeb = parser.GetContractList(webText, date);

            Assert.IsTrue(listFromWeb.Count == 0);
        }
Пример #2
0
        public void DceTransactionContractListTest()
        {
            DateTime date        = new DateTime(2014, 1, 6);
            string   webText     = TestUtility.RetrieveWebPage(date, new DceDailyTransactionCrawler());
            var      parser      = new DceTransactionParser();
            var      listFromWeb = parser.GetContractList(webText, date);

            var testData = new List <ContractTransactionInfo>();

            testData.Add(new ContractTransactionInfo(date, "dce", "a", "1401", -1, -1, -1, 4425, 4425, 0, 22));
            testData.Add(new ContractTransactionInfo(date, "dce", "fb", "1405", 69.45, 69.55, 66.65, 66.75, 67.25, 348528, 88992));
            testData.Add(new ContractTransactionInfo(date, "dce", "y", "1412", -1, -1, -1, 6992, 6992, 0, 14));
            testData.Add(new ContractTransactionInfo(date, "dce", "bb", "1409", 123.4, 123.9, 119.45, 121.5, 121.45, 46, 194));
            testData.Add(new ContractTransactionInfo(date, "dce", "fb", "1412", -1, -1, -1, 68.2, 68.2, 0, 2));
            testData.Add(new ContractTransactionInfo(date, "dce", "i", "1409", 878, 882, 871, 873, 874, 9560, 37276));
            testData.Add(new ContractTransactionInfo(date, "dce", "l", "1409", 10750, 10800, 10725, 10755, 10760, 10508, 28282));

            ValidateValues(testData, listFromWeb);
        }