示例#1
0
        public void ParseValidMultiTables()
        {
            var files = Directory.GetFiles(ContentHelper.RootDataFolder, "multitable-[*]-valid.ssv");

            foreach (var file in files)
            {
                Console.WriteLine(file);
                var originalContent = File.ReadAllLines(file);
                var parser          = new SsvParser();
                var ssv             = parser.Parse(originalContent);

                SsvAssertHelper.AssertSsvEqualsContentLines(ssv, originalContent);

                Console.WriteLine(" - ok");
            }
        }
示例#2
0
        public void ParseValidSingleTablesWithColumnNamesHeaderOnly()
        {
            var files = Directory.GetFiles(ContentHelper.RootDataFolder, "singletable-header-colnames-[*]-valid.ssv");

            foreach (var file in files)
            {
                Console.WriteLine(file);
                var originalContent = File.ReadAllLines(file);
                var parser          = new SsvParser();
                var ssv             = parser.Parse(originalContent);

                SsvAssertHelper.AssertSsvEqualsContentLines(ssv, originalContent);
                Assert.AreEqual(Ssv.LineType.ColumnsNames, ssv.Lines[0].LineType);

                Console.WriteLine(" - ok");
            }
        }