Created
March 23, 2012 12:26
-
-
Save svrist/2170235 to your computer and use it in GitHub Desktop.
Freeze false -> Func<bool>() == true?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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