Skip to content

Instantly share code, notes, and snippets.

@StacyGay
Created April 11, 2021 20:08
Show Gist options
  • Save StacyGay/97a48d598669f330da6841048f133615 to your computer and use it in GitHub Desktop.
Save StacyGay/97a48d598669f330da6841048f133615 to your computer and use it in GitHub Desktop.
Trinity of test - AutoFixture
var fixture = new Fixture();
var someString = fixture.Create<string>();
Console.WriteLine(someString);
// 30a35da1-d681-441b-9db3-77ff51728b58
var generatedPerson = fixture.Create<Person>();
Console.WriteLine(generatedPerson.Name);
// namef5cdf6b1-a473-410f-95f3-f427f7abb0c7
Console.WriteLine(generatedPerson.Age);
// 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment