public void Walk_ValidNodeWithChildren_Throws() { var node = new HamlNodeDocType(new HamlLine("", HamlRuleEnum.DocType, indent: "")); node.AddChild(new HamlNodeTextContainer(new HamlSourceFileMetrics(0, 0, 0, 0), "")); Assert.Throws<HamlInvalidChildNodeException>(() => _walker.Walk(node)); }
public void Walk_ValidNodeWithChildren_Throws() { var node = new HamlNodeDocType(new HamlLine("", HamlRuleEnum.DocType, "", -1)); node.AddChild(new HamlNodeTextContainer(-1, "")); Assert.Throws<HamlInvalidChildNodeException>(() => _walker.Walk(node)); }
public void Walk_ValidNodeWithNoChildren_AppendsDocType() { var node = new HamlNodeDocType(new HamlLine("", HamlRuleEnum.DocType, indent: "")); _walker.Walk(node); _classBuilderMock.Verify(x => x.AppendDocType("")); }