public void Combined_Expression_Text_Tag_Attribute() { var attribute = new TagAttributeNode(new TextNode("Hello "), new ExpressionNode("(A+B)*C", "Multiply", typeof(decimal)). Add(new ExpressionNode("(A Add B)", "Brackets", typeof(decimal)).Add(new ExpressionNode("A+B", "Add", typeof(decimal)). Add(new ExpressionNode("A", "Property", null)). Add(new ExpressionNode("B", "Property", null)))). Add(new ExpressionNode("C", "Property", null))); Assert.That(attribute.Raw, Deeply.Is.EqualTo("Hello ${(A+B)*C}")); }
public void Single_Text_Tag_Attribute() { var attribute = new TagAttributeNode(new TextNode("Hello")); Assert.That(attribute.Raw, Deeply.Is.EqualTo("Hello")); }
public void Single_Property_Tag_Attribute() { var attribute = new TagAttributeNode(new ExpressionNode("Greetings", "Property", null)); Assert.That(attribute.Raw, Deeply.Is.EqualTo("${Greetings}")); }
public void Combined_Property_Text_Tag_Attribute() { var attribute = new TagAttributeNode(new TextNode("Hello "), new ExpressionNode("Person", "Property", null)); Assert.That(attribute.Raw, Deeply.Is.EqualTo("Hello ${Person}")); }