public RuleElementDefiniton(Literal literal)
 {
     Type = ExpressionElementType.Literal;
     EntityName = literal.EntityName;
     AttributeName = literal.AttributeName;
     Negated = literal.Negated;
 }
 public void SetData(string entityName, string attrName)
 {
     Initialize();
     _entityLabel.text       = entityName;
     _attributeLabel.text    = attrName;
     Literal = new Literal() { AttributeName = attrName, EntityName = entityName };
 }
 public void SetData(Literal literal)
 {
     Initialize();
     Literal = literal;
     _entityLabel.text = literal.EntityName;
     _attributeLabel.text = literal.AttributeName;
     SetNegated();
     Literal = literal;
 }
 public void ToExprStrTest()
 {
     var literal = new Literal { EntityName = "Farmer", AttributeName = "OnBoat", Negated = true };
     literal.ToExprStr().Should().Be("!fa ronb");
 }