예제 #1
0
        public void TestGetAllCodes()
        {
            List <CodeInfo>     codes = CsvUtils_Code.Load(TestCaseManager.GetTestCasePath(GetType(), "Codes"));
            CacheUtils_CodeInfo cache = new CacheUtils_CodeInfo(codes);

            List <CodeInfo> newcodes = cache.GetAllCodes();

            AssertUtils.AssertEqual_List("Codes", GetType(), newcodes);
        }
예제 #2
0
        public void TestGetAllCodesByVariety()
        {
            List <CodeInfo>     codes = CsvUtils_Code.Load(TestCaseManager.GetTestCasePath(GetType(), "Codes"));
            CacheUtils_CodeInfo cache = new CacheUtils_CodeInfo(codes);

            List <CodeInfo> newcodes = cache.GetCodesByCatelog("m", 20160101);

            //AssertUtils.PrintLineList(newcodes);
            AssertUtils.AssertEqual_List("Codes_M_20160101", GetType(), newcodes);
        }
예제 #3
0
        public void TestInstrumentsSaveLoad()
        {
            string          path        = TestCaseManager.GetTestCasePath(GetType(), "CsvUtils_Instruments");
            List <CodeInfo> instruments = CsvUtils_Code.Load(path);

            string outputPath = TestCaseManager.GetTestCasePath(GetType(), "Instruments_Output.csv");

            CsvUtils_Code.Save(outputPath, instruments);

            List <CodeInfo> newInstruments = CsvUtils_Code.Load(outputPath);

            AssertUtils.AssertEqual_List(instruments, newInstruments);
            //TestCaseManager.SaveTestCaseFile(GetType(),)
            //List<InstrumentInfo> instruments = MockDataLoader.GetAllInstruments();
            //AssertUtils.AssertEqual_List("CsvUtils_Instruments", GetType(), instruments);
        }