public void TestShouldReturnEmptyCPFWhenPassLessThan11Chars() { CPF cpf = "12E45"; Assert.AreEqual <string>("1245", cpf); Assert.AreEqual <string>("000.000.012-45", cpf.ComMascara()); }
public void TestShouldReturnEmptyCPFWhenPassNull() { CPF cpf = null; Assert.AreEqual <string>("", cpf); Assert.AreEqual <string>("", cpf.ComMascara()); }
public static string CPFMascara(string cpf, bool mascara = true) { CPF cpfBR = cpf; if (mascara) { return(cpfBR.ComMascara()); } else { return(cpfBR.SemMascara()); } }
public void TestShouldReturnCPFWithMask() { CPF cpf = unformattedCPF; Assert.AreEqual(formattedCPF, cpf.ComMascara()); }