public void WithElement_Should_Throw_For_Duplicate_Elements()
 {
     var recordGroup = new RecordGroup();
     var expression = new RecordExpression(recordGroup);
     expression.WithElement("a");
     expression.WithElement("a");
 }
 public void WithElement_Applies_Custom_Configuration()
 {
     var recordGroup = new RecordGroup();
     var expression = new RecordExpression(recordGroup);
     Assert.IsNotNull(expression.WithElement("elementName", x => x.WithLabel("bla")));
     Assert.AreEqual(recordGroup.Elements.Count, 1);
     Assert.AreEqual(((RecordElement)recordGroup.Elements[0]).Label, "bla");
 }
 public void WithElement_Adds_New_Element()
 {
     var recordGroup = new RecordGroup();
     var expression = new RecordExpression(recordGroup);
     Assert.IsNotNull(expression.WithElement("elementName"));
     Assert.AreEqual(recordGroup.Elements.Count, 1);
     Assert.AreEqual(((RecordElement)recordGroup.Elements[0]).Name, "elementName");
 }