public void MethodIsNotAssignable()
 {
     var re = new RuleExpression("Person.Age");
     Assert.IsTrue(re.IsValid(_context));
     Assert.IsFalse(re.IsAssignable(_context));
 }
 public void ReadOnlyPropertyIsNotAssignable()
 {
     var re = new RuleExpression("Person.MedicalRecordNumber");
     Assert.IsTrue(re.IsValid(_context));
     Assert.IsFalse(re.IsAssignable(_context));
 }
 public void EmptyExpressionIsInvalid()
 {
     var re = new RuleExpression { };
     Assert.IsFalse(re.IsValid(_context));
 }
 public void InvalidMemberIsInvalid()
 {
     var re = new RuleExpression("Person.Whatever");
     Assert.IsFalse(re.IsValid(_context));
 }
 public void AssignedTargetPropertyIsValid()
 {
     var re = new RuleExpression("Person.LastName");
     Assert.IsTrue(re.IsValid(_context));
 }
 public void AssignedTargetMethodIsValid()
 {
     var re = new RuleExpression("Person.IsMinor");
     Assert.IsTrue(re.IsValid(_context));
 }
 public void AssignedSimpleTargetIsValid()
 {
     var re = new RuleExpression("SomeString");
     Assert.IsTrue(re.IsValid(_context));
 }
 public void UnassignedTargetIsInvalid()
 {
     var re = new RuleExpression("Patient.LastName");
     Assert.IsFalse(re.IsValid(_context));
 }
 public void UnassignedSimpleTargetIsInvalid()
 {
     var re = new RuleExpression("Whatever");
     Assert.IsFalse(re.IsValid(_context));
 }