Exemplo n.º 1
0
        public void ReadQualifiedTextTest()
        {
            char[]      buffer         = new char[1];
            int         bufferPosition = 0;
            StateReader target         = new InitialState(',', '"');

            target = target.ReadChar('"', ref buffer, ref bufferPosition);

            Assert.AreNotEqual('"', buffer[0]);
            Assert.AreEqual(0, bufferPosition);
            Assert.IsTrue(target is EndTextQualifierState);
        }
Exemplo n.º 2
0
        public void ReadNonDelimiterTest()
        {
            char[]      buffer         = new char[1];
            int         bufferPosition = 0;
            StateReader target         = new InitialState(',', '"');

            target = target.ReadChar('a', ref buffer, ref bufferPosition);

            Assert.AreEqual('a', buffer[0]);
            Assert.AreEqual(1, bufferPosition);
            Assert.IsTrue(target is DelimiterState);
        }