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(); }
private void TestParseNode(INode expected, string str) { var calculated = TagNode.ParseNode(StringToDoc(str).DocumentNode.FirstChild); Assert.IsTrue(expected.Equals(calculated)); }