using AutoFixture.AutoMoq;
var fixture = new Fixture();
fixture.Customize(new AutoMoqCustomization());
var commands = fixture.CreateMany<Command>(20).ToList();
commands.ForEach(command => Console.WriteLine(command.Type));
public enum CommandType { CREATE_FOO, DELETE_FOO }
public abstract class Command
public int Id { get; set; }
public CommandType Type { get; set; }
public abstract class CreateCommand : Command { }
public class CreateFoo : CreateCommand
public CreateFoo() => Type = CommandType.CREATE_FOO;
public abstract class DeleteCommand : Command { }
public class DeleteFoo : DeleteCommand
public DeleteFoo() => Type = CommandType.DELETE_FOO;