public void TestCPF(string cpf, bool expected) { var attribute = new CPFAttribute(); var actual = attribute.IsValid(cpf); Assert.AreEqual(expected, actual); }
public IAttributeAdapter GetAttributeAdapter(CPFAttribute attribute, IStringLocalizer stringLocalizer) { if (attribute is CPFAttribute) { return(new CPFAttributeAdapter(attribute as CPFAttribute, stringLocalizer)); } else { return(_baseProvider.GetAttributeAdapter(attribute, stringLocalizer)); } }