Esempio n. 1
0
        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");
            }
        }
Esempio n. 2
0
        private List <string> ReadIt(List <IColumn> columns)
        {
            List <string> data;

            using (_fileReader = DataFileReaderFactory.CreateInstance(_dataFileName))
            {
                data = _fileReader.ReadLine(columns);
            }
            return(data);
        }
Esempio n. 3
0
        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");
            }
        }
Esempio n. 4
0
        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);
            }
        }