public bool IsSatisfiedByObject(object @object) { Type type = @object.GetType(); PropertyInfo pinfo = type.GetProperty(this.property); return pinfo.GetValue(@object, null).Equals(this.value); }
public void IsSatisfiedByStringLength() { PropertyIsFact fact = new PropertyIsFact("p", "Length", 3); fact.IsSatisfiedByObject("123"); }