Skip to content

Instantly share code, notes, and snippets.

@felipebaltazar
Created December 11, 2021 22:10
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/d4a510c5e9e17202d24ad79b171585f7 to your computer and use it in GitHub Desktop.
Save felipebaltazar/d4a510c5e9e17202d24ad79b171585f7 to your computer and use it in GitHub Desktop.
public class MyViewModelTests
{
private readonly MyViewModel _myViewModel = new MyViewModel();
[Theory]
[InlineData("111.111.111-11", true)]
[InlineData("111111.111-11", false)]
[InlineData("111.111111-11", false)]
[InlineData("111.111.11111", false)]
[InlineData("11111111111", false)]
[InlineData("qioweoi1nadslk", false)]
public void IsValidCPF_ShouldValidateStringMask(string input, bool expectedValue)
{
var result = _myViewModel.IsValidCPF(input);
Assert.Equal(expectedValue, result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment