Freeze
Inject
and Register
are slightly different.
Use Inject
for the described behavior, as the following test demonstrates:
[Fact]
public void Test()
{
var fixture = new Fixture();
var expected = Letters.D;
fixture.Inject(expected);
var letter = fixture.Create<Letters>();
var anotherLetter = fixture.Create<Letters>();
Assert.Equal(expected, letter);
Assert.Equal(expected, anotherLetter);
}
The problem with the question's sample code is that the parameter (seed) isn't used as the frozen value.