public void Using(CsvProfile profile) { if (profile != null) { this.profile = profile; } }
public void Read_MissingValue_MatchWithNullValue() { using (var stream = new MemoryStream()) { using (var writer = new StreamWriter(stream)) { writer.Write("a;b;c\r\na;b\r\na;b;c"); writer.Flush(); stream.Position = 0; var profile = new CsvProfile(';', '"', "\r\n", false, true, 512, string.Empty, "(null)"); var reader = new CsvReaderProxy(profile); var dataTable = reader.Read(stream); Assert.That(dataTable.Rows[1][2], Is.EqualTo("(null)")); } } }
public void Read_Comment_CommentedLinesSkipped(string content) { using (var stream = new MemoryStream()) { using (var writer = new StreamWriter(stream)) { writer.Write(content); writer.Flush(); stream.Position = 0; var profile = new CsvProfile(new CsvDialectDescriptor { Header = false, Delimiter = ';', CommentChar = '#', DoubleQuote = false }); var reader = new CsvReaderProxy(profile); var dataTable = reader.Read(stream); Assert.That(dataTable.Rows.Count, Is.EqualTo(2)); Assert.That(dataTable.Columns.Count, Is.EqualTo(3)); } } }
public ResultSetCsvWriter(string persistancePath, CsvProfile definition) : base(persistancePath) { Definition = definition; }
public EqualToConstraint CsvProfile(CsvProfile profile) { this.csvProfile = profile; return(this); }
public CsvReaderProxy(CsvProfile profile) : base(profile) { }
public BaseResultSetComparisonConstraint CsvProfile(CsvProfile profile) { this.csvProfile = profile; return(this); }
public ResultSetBuilder(CsvProfile profile) { this.profile = profile; }
public CsvResultSetResolverArgs(string path, CsvProfile profile) { this.Path = path; this.Profile = profile; }
public CsvResultSetResolverArgs(IScalarResolver <string> path, string basePath, CsvProfile profile) { this.Path = path; this.BasePath = basePath; this.Profile = profile; }
public ResultSetCsvWriter(string persistancePath) : base(persistancePath) { Definition = CsvProfile.SemiColumnDoubleQuote; }
public CsvReaderProxy(CsvProfile profile, int bufferSize) : base(profile, bufferSize) { }