I\'ve just started to use AutoFixture.AutoMoq in my unit tests and I\'m finding it very helpful for creating objects where I don\'t care about the specific
You have to replace:
string knownValue = fixture.Freeze("My known value");
with:
fixture.Inject("My known value");
You can read more about Inject
here.
Actually the Freeze
extension method does:
var value = fixture.Create();
fixture.Inject(value);
return value;
Which means that the overload you used in the test actually called Create
with a seed: My known value resulting in "My known value4d41f94f-1fc9-4115-9f29-e50bc2b4ba5e".