views:

19

answers:

0

Hi Folks,

pretty simple question: can I use NBuilder to create a collection of x number of random strings?

I was trying...

// NOTE: Tags need to be lowercase.
return Builder<string>
    .CreateListOfSize(10)
    .WhereAll()
        .Has(x => x = randomGenerator.Phrase(15))
    .WhereTheFirst(1)
        .Has(x => x = "time")
    .AndTheNext(1)
        .Has(x => x = "place")
    .AndTheNext(1)
        .Has(x => x = "colour")
    .Build();

but it was run-time erroring, something about I needed to call some specific constructor or something.

Anyone have any ideas?