/// <summary> /// Gets Where expression by object type, property name and selector value. /// </summary> /// <typeparam name="T">Object type.</typeparam> /// <param name="property">Property name.</param> /// <param name="value">Object value.</param> /// <returns></returns> public static Expression <Func <T, bool> > GetWhereEqualExpression <T>(string property, object value) where T : class { ParametersValidator.IsNotNullOrWhiteSpace(property, () => property); ParametersValidator.IsNotNull(value, () => value); var propertyInfo = typeof(T).GetProperty(property); return(GetWhereEqualExpression <T>(propertyInfo, value)); }
public void OneParamIsNotNullOrWhiteSpaceWithEmptyTest() { var st = String.Empty; ParametersValidator.IsNotNullOrWhiteSpace(() => st); }
public void OneParamIsNotNullOrWhiteSpaceWithNullTest() { string st = null; ParametersValidator.IsNotNullOrWhiteSpace(() => st); }
public void OneParamIsNotNullOrWhiteSpacePassTest() { const string st = "Test String"; ParametersValidator.IsNotNullOrWhiteSpace(() => st); }