Created
December 11, 2021 22:08
-
-
Save felipebaltazar/c4ae1c48b0f992d44fdeffea98433423 to your computer and use it in GitHub Desktop.
Stryker mutation test sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyViewModel | |
{ | |
private readonly Regex _cpfMask = new Regex(@"^\d{3}\.\d{3}\.\d{3}-\d{2}$", RegexOptions.Compiled); | |
public bool IsValidCPF(string cpfInput) | |
{ | |
if (string.IsNullOrWhiteSpace(cpfInput)) | |
return false; | |
return _cpfMask.Match(cpfInput).Success; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment