Пример #1
0
        public void Write(string str)
        {
            HtmlDocument doc = new HtmlDocument();

            doc.LoadHtml($"<message>{str}</message>");

            // The top level block is not wrapped (the console software will take care of that).
            //blockWriterStack.Push(new BlockWriter(GetConsoleWidth(), false));

            // Parse
            var root = TagNode.ParseNode(doc.DocumentNode);

            // Calculate styles

            // Measure

            // Arrange

            //ParseElement(doc.DocumentElement);

            /*Assert.AreEqual(0, pathSegmentStack.Count);
            *  Assert.AreEqual(1, blockWriterStack.Count);*/

            //WriteToOutputCore(CurrentBlockWriter.GetString());

            blockWriterStack.Pop();
        }
Пример #2
0
        private void TestParseNode(INode expected, string str)
        {
            var calculated = TagNode.ParseNode(StringToDoc(str).DocumentNode.FirstChild);

            Assert.IsTrue(expected.Equals(calculated));
        }