public void TestTwoLines_When_StringAndInt() { CreateFile("'A unicode ﺽ string',1,\n'test',2,\n"); List <IColumn> columns = CreateTwoColumns(); using (_fileReader = DataFileReaderFactory.CreateInstance(_dataFileName)) { var data = _fileReader.ReadLine(columns); data.Should().Equal("A unicode ﺽ string", "1"); data = _fileReader.ReadLine(columns); data.Should().Equal("test", "2"); } }
private List <string> ReadIt(List <IColumn> columns) { List <string> data; using (_fileReader = DataFileReaderFactory.CreateInstance(_dataFileName)) { data = _fileReader.ReadLine(columns); } return(data); }
public void TestReadLine_When_StringIsNULL() { CreateFile("'NULL',1,\n"); List <IColumn> columns = CreateTwoColumns(); using (_fileReader = DataFileReaderFactory.CreateInstance(_dataFileName)) { var data = _fileReader.ReadLine(columns); data.Should().Equal("NULL", "1"); } }
public void TestCompressedFile_With_HighUnicodeValue() { _dataFileName += ".dz"; const string sampleString = "abﺽ cﺽ"; CreateCompressedFile(sampleString); List <IColumn> columns = CreateTwoColumns(); using (_fileReader = DataFileReaderFactory.CreateInstance(_dataFileName)) { var val = _fileReader.ReadLine(columns); val[0].Should().Be(sampleString); } }