Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@maiconheck
Last active June 20, 2023 19:27
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 maiconheck/f6003bcca94b6d21cd42f7da689891e4 to your computer and use it in GitHub Desktop.
Save maiconheck/f6003bcca94b6d21cd42f7da689891e4 to your computer and use it in GitHub Desktop.
[Trait("Category", nameof(Domain))]
public class NameTest
{
[Theory]
[InlineData("Lucas Luís", "Cruz")]
[InlineData("Erick Oliveira", "")]
public void Name_ValidName_Valid(string firstName, string lastName)
{
Assert.DoesNotThrows(() => new Name(firstName, lastName));
}
[Theory]
[InlineData("")]
[InlineData(" ")]
public void Name_InvalidName_Invalid(string firstName)
{
Assert.Throws<ArgumentNullException>(() => new Name(firstName));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment