Skip to content

Instantly share code, notes, and snippets.

@felipebaltazar
Created December 11, 2021 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipebaltazar/c4ae1c48b0f992d44fdeffea98433423 to your computer and use it in GitHub Desktop.
Save felipebaltazar/c4ae1c48b0f992d44fdeffea98433423 to your computer and use it in GitHub Desktop.
Stryker mutation test sample
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