Closed JerryNixon closed 3 years ago
Hey @JerryNixon
You can use Moq to create mock instances of dependency types. This is achieved by using the configuration handlers (at the global, faker or generate level) to register the Moq binder.
// Global
AutoFaker.Configure(builder =>
{
builder.WithBinder<MoqBinder>();
});
// Faker
var faker = AutoFaker.Create(builder =>
{
builder.WithBinder<MoqBinder>();
});
// Generate
var person = AutoFaker.Generate<Person>(builder =>
{
builder.WithBinder<MoqBinder>();
});
Hope that helps.
Nick.
Hey, just looking around for a sample using AutoBogus.Moq? Just need to get started.