Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }