Is there any way in AutoFixture so that fixture.Create<string>()
will yield the same result? I.e., can I initialize the fixture with a seed?
Update
To be more precise, I'm looking for a random value generator that is initialised with some random seed, which is also outputted if a test fails. Thus, I can take the seed for that particular test run, and run the test with the fixed seed again. The seed should apply to all instances, regardless of their types. I think this is the most powerful way to use random values in tests, because it has a huge coverage, and is also reproducible.
Random
object to generate values. In all the years I've used it, I've never needed such a feature either. If a test fails, you can write them in such a way that the test report will always include which values were used. For example, if you use AutoFixture.Xunit, this happens automatically. – Engineering