public void ToString_WithTextNotNull_ShouldReturnText() { const string text = "test"; var node = new TextNode(text); Assert.AreEqual(text, node.ToString()); }
public void AsTextNode_WithTextNode_ShouldBeCastToTextNode() { Node node = new TextNode(string.Empty); var castNode = node.AsTextNode(); Assert.IsInstanceOfType(castNode, typeof(TextNode)); }
public void Constructor_WithText_ShouldSetTextProperty() { const string text = "test"; var node = new TextNode(text); Assert.AreEqual(text, node.Text); }
public void ToString_WithTextNull_ShouldReturnEmptyString() { var node = new TextNode(null); Assert.AreEqual(string.Empty, node.ToString()); }
public void AsTagNode_WithNonTagNode_ShouldThrowInvalidCastException() { Node node = new TextNode(string.Empty); node.AsTagNode(); }