Example #1
0
 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}"));
 }
Example #2
0
 public void Single_Text_Tag_Attribute()
 {
     var attribute = new TagAttributeNode(new TextNode("Hello"));
     Assert.That(attribute.Raw, Deeply.Is.EqualTo("Hello"));
 }
Example #3
0
 public void Single_Property_Tag_Attribute()
 {
     var attribute = new TagAttributeNode(new ExpressionNode("Greetings", "Property", null));
     Assert.That(attribute.Raw, Deeply.Is.EqualTo("${Greetings}"));
 }
Example #4
0
 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}"));
 }