コード例 #1
0
        public async Task GetCsvFileSettingFromExtensionAsync()
        {
            using (var processDisplay = new CustomProcessDisplay(UnitTestInitializeCsv.Token))
            {
                var tuple = await CsvHelper.AnalyseFileAsync(UnitTestInitializeCsv.GetTestPath("BasicCSV.txt" + CsvFile.cCsvSettingExtension), true, true, true,
                                                             true, true, true, true, new FillGuessSettings(), processDisplay);

                Assert.AreEqual(1200, tuple.CodePageId);
            }
        }
コード例 #2
0
        public async System.Threading.Tasks.Task GetCsvFileSetting()
        {
            using (IProcessDisplay process = new CustomProcessDisplay(UnitTestInitializeCsv.Token))
            {
                var result = await CsvHelper.AnalyseFileAsync(UnitTestInitializeCsv.GetTestPath("BasicCSV.txt"), true, true, true, true, true, true, false,
                                                              new FillGuessSettings(), process);

                Assert.IsTrue(result.HasFieldHeader);
                Assert.AreEqual(1200, result.CodePageId);
            }
        }