Beispiel #1
0
        public void MascaraNaoPodeSerNullOuVazio(string mask)
        {
            Action act = () => Masks.Apply(mask, "012345678909");

            act.Should().ThrowExactly <ArgumentNullException>()
            .And.ParamName.Should().Be("mask");
        }
Beispiel #2
0
        public void MascarasAceitas(string s, string expected)
        {
            var result = Masks.Apply(Masks.Cpf, s);

            result.Should().Be(expected);
        }
Beispiel #3
0
        public void ValorMenorQueMascara(string mask, string value, string expected)
        {
            var result = Masks.Apply(mask, value);

            result.Should().Be(expected);
        }
Beispiel #4
0
        public void MascarasValidas(string mask, string value, string expected)
        {
            var result = Masks.Apply(mask, value);

            result.Should().Be(expected);
        }
Beispiel #5
0
        public void RetornaNullSeValorForNull()
        {
            var resultado = Masks.Apply("###", null);

            resultado.Should().BeNull();
        }