public static void AssertProperty <TInstance, TProperty>(this StructureTest test, Expression <Func <TInstance, TProperty> > locator, params IMemberVerifier[] verifiers) { MemberExpression newExpression = (MemberExpression)locator.Body; PropertyInfo propertyInfo = (PropertyInfo)newExpression.Member; test.AssertProperty(propertyInfo, verifiers); }
public static void AssertPublicWriteonlyProperty <TInstance, TProperty>(this StructureTest test, Expression <Func <TInstance, TProperty> > locator) { test.AssertProperty(locator, new MemberAccessLevelVerifier(AccessLevels.Public), new PropertyIsWriteonlyVerifier()); }
public static void AssertPublicReadonlyProperty <TInstance, TProperty>(this StructureTest test, Expression <Func <TInstance, TProperty> > locator) { test.AssertProperty(locator, new PropertyIsReadonlyVerifier()); }
public static void AssertPublicReadonlyProperty(this StructureTest test, PropertyInfo propertyInfo) { test.AssertProperty(propertyInfo, new PropertyIsReadonlyVerifier()); }
public static void AssertPublicProperty <TInstance, TProperty>(this StructureTest test, PropertyInfo propertyInfo) { test.AssertProperty(propertyInfo, new MemberAccessLevelVerifier(AccessLevels.Public)); }