示例#1
0
        public void AccumulatorWithEscapedTextDelimiter()
        {
            var accumulator = new Accumulator("A,\"B,\"\"C\"\"\",D", delimiter: ',') {TextDelimiter = '"'};
            Assert.That(accumulator.Next(), Is.EqualTo("A"));
            Assert.That(accumulator.Next(), Is.EqualTo("B,\"C\""));
            Assert.That(accumulator.Next(), Is.EqualTo("D"));

            Assert.That(accumulator.Next(), Is.Null);
        }
示例#2
0
        public void AccumulatorWithTextDelimiter()
        {
            var accumulator = new Accumulator("A,\"B\",C", delimiter: ',') {TextDelimiter = '"'};
            Assert.That(accumulator.Next(), Is.EqualTo("A"));
            Assert.That(accumulator.Next(), Is.EqualTo("B"));
            Assert.That(accumulator.Next(), Is.EqualTo("C"));

            Assert.That(accumulator.Next(), Is.Null);
        }
示例#3
0
        public void AccumulatorSimple()
        {
            var accumulator = new Accumulator("A,B,C", delimiter: ',');
            Assert.That(accumulator.Next(), Is.EqualTo("A"));
            Assert.That(accumulator.Next(), Is.EqualTo("B"));
            Assert.That(accumulator.Next(), Is.EqualTo("C"));

            Assert.That(accumulator.Next(), Is.Null);
        }