public void String_type_should_apply() { var person = new { Name = "stringvalue" }; PropertyInfo propertyInfo = person.GetType().GetProperty("Name"); LambdaConvention convention = Convention.ByType <string>(p => ARandom.String(10)); convention.AppliesTo(propertyInfo).should_be_true(); }
public void Incorrect_type_should_not_apply() { var person = new { BoolVal = false }; PropertyInfo propertyInfo = person.GetType().GetProperty("BoolVal"); LambdaConvention convention = Convention.ByType <string>(p => ARandom.String(10)); convention.AppliesTo(propertyInfo).should_be_false(); }