我之前在这个链接上发布了一个问题:
我现在需要能够使用嵌套类来做同样的事情:
像这样:
public class ParentClass
{
public int Value;
public IList<ChildClass> Children;
}
public class ChildClass
{
etc...
}
我尝试了这个:
Fixture.Register(()=>Fixture.CreateMany<ChildClass>();
但这不起作用,有什么想法吗?我正在使用AutoFixture 2.0。