public void ReadMultipleDataRowsAfterHeaderWithMessyParsing()
        {
            RowData rowData = new RowData();
            IFileReader reader = FileReaderTest.GetReader("\r\n\r\nHeader text\r\n A)::-)brr\"-:-)\r\n-\r\nasdfghj\"-\"\"-\":-)\"-\":-)\"-\"\"-\"\"-\":--\r");
            DelimitedFileParser parser = new DelimitedFileParser(":-)", "-\r\n");
            parser.HeaderRowDelimiter = "\r\n";
            parser.HeaderRowsToSkip = 3;
            parser.TextQualifier = "\"-\"";

            parser.SkipHeaderRows(reader);
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { " A):", "brr\"-", "\r\n" });
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "asdfghj\"-\"\"-\"", ":-)\"-\":-" });
        }
        public void ReadQualifiedColumnNamesAfterHeaderTest()
        {
            RowData rowData = new RowData();
            IFileReader reader = FileReaderTest.GetReader("\r\n\r\nHeader text\r\n\"A\",B,\"C\"\r\n1,2,3");
            DelimitedFileParser parser = new DelimitedFileParser(",", "\r\n");
            parser.ColumnNameInFirstRow = true;
            parser.HeaderRowDelimiter = "\r\n";
            parser.HeaderRowsToSkip = 3;
            parser.TextQualifier = "\"";

            parser.SkipHeaderRows(reader);
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "A", "B", "C" });
        }
        public void ReadMultipleDataRowsAfterHeader()
        {
            RowData rowData = new RowData();
            IFileReader reader = FileReaderTest.GetReader("\r\n\r\nHeader text\r\n1,1,1,1\r\n2,2,2,2\r\n3,3,3,3\r\n4,4,4,4");
            DelimitedFileParser parser = new DelimitedFileParser(",", "\r\n");
            parser.HeaderRowDelimiter = "\r\n";
            parser.HeaderRowsToSkip = 3;

            parser.SkipHeaderRows(reader);
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "1", "1", "1", "1" });
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "2", "2", "2", "2" });
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "3", "3", "3", "3" });
            parser.ParseNextRow(reader, rowData);
            RowDataTest.VerifyParsedRow(rowData, new string[] { "4", "4", "4", "4" });
        }
        public void SkipHeaderRowsArgumentTest()
        {
            DelimitedFileParser parser = new DelimitedFileParser(",", "\r\n");

            parser.SkipHeaderRows(null);
        }