コード例 #1
0
        public void ApplyCPFFormat_InvalidCpfOrFormats_ThrowsException(string cpf)
        {
            Action act       = () => StringExtensions.ApplyCPFFormat(cpf);
            var    exception = Assert.Throws <FormatException>(act);

            Assert.Equal(Messages.CPFInvalid, exception.Message);
        }
コード例 #2
0
        public void ApplyCPFFormat_ValidCpfWithWithoutFormats_FormmatedPassword(string cpf)
        {
            var result = StringExtensions.ApplyCPFFormat(cpf);

            Assert.Equal("111.444.777-35", result);
        }