I have an issue with creating a string array of type string[], everytime it creates 3 values but i want to be able to control this.
I am using
var tst = fixture.Create<string[]>();
I also looked into using CreateMany
but that seemed to return a type of IEnumerable.
Anyone have any ideas ?
Use the RepeatCount
property:
var fixture = new Fixture { RepeatCount = 9 }; var actual = fixture.Create<string[]>(); // -> The 'actual' array is 9 items now.
or
fixture.CreateMany<string>(9).ToArray()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With