Example #1
0
        public void rowToList_RowAsQuotesAndSeperatorInQuotes_ReturnExpectedListOfStrings()
        {
            //Arrange
            string        row             = "'V1';'V2';'V3;V4'";
            List <string> expectedOutcome = new List <string> {
                "V1", "V2", "V3;V4"
            };

            AsciiFileReaderInfo info = new AsciiFileReaderInfo();

            info.Seperator = TextSeperator.semicolon;

            AsciiReader reader = new AsciiReader(new StructuredDataStructure(), info);

            //Act

            List <string> values = reader.rowToList(row,
                                                    AsciiFileReaderInfo.GetSeperator(TextSeperator.semicolon));

            //Assert

            Assert.That(values.Count, Is.EqualTo(expectedOutcome.Count));
            Assert.That(values, Is.EquivalentTo(expectedOutcome));
        }