Exemplo n.º 1
0
        public void test()
        {
            loadInParser("include_1.jade");

            tagNode = (TagNode)root.pollNode();
            Assert.AreEqual(tagNode.getName(), ("p"));
            textNode = (TextNode)tagNode.getTextNode();
            Assert.AreEqual(textNode.getValue(), ("Before Include"));

            includeNode = (BlockNode)root.pollNode();
            tagNode     = (TagNode)includeNode.pollNode();
            Assert.AreEqual(tagNode.getName(), ("span"));
            textNode = (TextNode)tagNode.getTextNode();
            Assert.AreEqual(textNode.getValue(), ("Hello Include"));

            yieldNode = (BlockNode)includeNode.pollNode();
            Assert.IsNotNull(yieldNode);

            /*var blockNode = (BlockNode) yieldNode.pollNode();
             * tagNode = (TagNode)blockNode.pollNode();
             * Assert.AreEqual(blockNode.getName(), ("p"));
             * textNode = (TextNode) tagNode.getTextNode();
             * Assert.AreEqual(textNode.getValue(), ("After Include"));
             *
             * Assert.AreEqual(yieldNode.hasNodes(), (false));
             * Assert.AreEqual(includeNode.hasNodes(), (false));
             * Assert.AreEqual(root.hasNodes(), (false));
             */
        }