Skip to content

Instantly share code, notes, and snippets.

@svrist
Created March 23, 2012 12:26
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 svrist/2170235 to your computer and use it in GitHub Desktop.
Save svrist/2170235 to your computer and use it in GitHub Desktop.
Freeze false -> Func<bool>() == true?
[Test]
public void TestFxitureFreeze()
{
Fixture fixture = new Fixture();
fixture.Freeze(false);
var f = fixture.CreateAnonymous<Func<bool>>();
Assert.That(f(),Is.False); // fails
}
[Test]
public void TestFxitureInject()
{
Fixture fixture = new Fixture();
fixture.Inject(false);
var f = fixture.CreateAnonymous<Func<bool>>();
Assert.That(f(),Is.False); // works
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment