Beispiel #1
0
        public void ShouldAcceptValidFormattedCPF()
        {
            CPF cpf = new CPF("111.111.111-11");

            Assert.AreEqual("11111111111", cpf.GetNumero());
            Assert.AreEqual("111.111.111-11", cpf.GetNumeroFormatado());
        }
Beispiel #2
0
        public void ShouldAcceptValidUnformattedCPF()
        {
            CPF cpf = new CPF("11144477735");

            Assert.AreEqual("11144477735", cpf.GetNumero());
            Assert.AreEqual("111.444.777-35", cpf.GetNumeroFormatado());
        }
Beispiel #3
0
        public void ShouldAcceptInvalidCPF()
        {
            CPF cpf = new CPF("843.843.131-84");

            Assert.AreEqual("84384313184", cpf.GetNumero());

            cpf = new CPF("111.111.1a1-11");
            Assert.AreEqual("111.111.1a1-11", cpf.GetNumero());
            Assert.AreEqual("111.111.1a1-11", cpf.GetNumeroFormatado());

            cpf = new CPF("111.1111.111-11");
            Assert.AreEqual("111.1111.111-11", cpf.GetNumero());
            Assert.AreEqual("111.1111.111-11", cpf.GetNumeroFormatado());

            cpf = new CPF("111.1.111-11");
            Assert.AreEqual("111.1.111-11", cpf.GetNumero());
            Assert.AreEqual("111.1.111-11", cpf.GetNumeroFormatado());
        }