非常简单的问题:我可以使用NBuilder创建x 个随机字符串的集合吗?
我试图...
// 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();
但这是运行时错误,我需要调用一些特定的构造函数或其他东西。
有人有想法么?