我正在使用NUnit3和AutoFixture与AutoDataAttribute
,如下所示:
[Test, AutoData]
public async Task Should_Filter_By_Date_Range_Only(Generator<AbpAuditLogs> generator)
{
var startDate = new DateTime(2015, 1, 1);
var endDate = new DateTime(2018, 1, 1);
var logs = generator.Take(20).ToList();
logs[5].ExecutionTime = GetRandomDateBetween(startDate, endDate);
}
如何提供来自内联值的数据以及来自AutoFixture的自动生成数据?
// Pseudo-code
// TestCase(1, 2, <some auto generated list here>)