Exemple #1
0
        public void CellWithQuotes()
        {
            table = p1.Parse( quoteT );

            Assert.AreEqual(2, table.Count );
            Assert.AreEqual(2, table[0].Count );
            Assert.AreEqual(2, table[1].Count );

            Assert.AreEqual("c11", table[0][0] );
            Assert.AreEqual("c12", table[0][1] );
            Assert.AreEqual("c21", table[1][0] );
            Assert.AreEqual("\"cell;\"", table[1][1]);
        }
Exemple #2
0
        public void CellWithQuotesAndMultiline()
        {
            table = p1.Parse( multiLineT );

            Assert.AreEqual(2, table.Count );
            Assert.AreEqual(2, table[0].Count );
            Assert.AreEqual(2, table[1].Count );

            Assert.AreEqual("c11", table[0][0] );
            Assert.AreEqual("c12", table[0][1] );
            Assert.AreEqual("c21", table[1][0] );
            Assert.AreEqual("\" na konci řádku  další řádek \"", table[1][1]);
        }
Exemple #3
0
        public void BasicTable()
        {
            table = p1.Parse( basicT );

            Assert.AreEqual(2, table.Count , "Wrong number of rows.");
            Assert.AreEqual(2, table[0].Count , "Wrong number of cells at 1. row.");
            Assert.AreEqual(2, table[1].Count );

            Assert.AreEqual("c11", table[0][0] );
            Assert.AreEqual("c12", table[0][1] );
            Assert.AreEqual("c21", table[1][0] );
            Assert.AreEqual("c22", table[1][1] );
        }
Exemple #4
0
        public void ZeroCell()
        {
            table = p1.Parse(" ;;cell 1,3");

            Assert.AreEqual(1, table.Count);
            Assert.AreEqual(3, table[0].Count);

            Assert.AreEqual("", table[0][0]);
            Assert.AreEqual("", table[0][1]);
            Assert.AreEqual("cell 1,3", table[0][2]);
        }