Professional Documents
Culture Documents
Bogus Implementation For Testing
Bogus Implementation For Testing
Bogus Implementation For Testing
{
var idArs = await _context.Ars.Select(a => a.id).ToListAsync();
var faker =
FakeSetup.GenerateInsuranceSetup(idArs).Generate(increment);
await _context.Seguro.AddRangeAsync(faker);
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
await _context.SaveChangesAsync();
}
___________________________________________________________________________________
____________________________________
return FakeEventType;
}
return Fakebooking;
}
return FakebookingDoctor;
}
public static Faker<BookingReferences>
GenerateBookingReferencesSetup(List<int> idbooking){
Faker<BookingReferences> Fakeb_References;
Randomizer.Seed = new Random(DateTime.Now.Millisecond);
Fakeb_References = new Faker<BookingReferences>()
.RuleFor(a => a.cancellationReason, b => b.Lorem.Paragraph())
.RuleFor(a => a.id_Booking, b =>
b.Random.ArrayElement(idbooking.ToArray()));
return Fakeb_References;
}
}
___________________________________________________________________________________
__________________________________
await _dummy.InsuranceCreate(increment);
await _dummy.DoctorsCreation(increment);
await _dummy.DoctorCenterCreation(increment);
await _dummy.PSSCodeCreation(increment);
await _dummy.MedicalCenterCreation(increment);
await _dummy.EventTypeCreation(increment);
await _dummy.BookingCreation(increment);
await _dummy.BookingsDoctorCreation(increment);
await _dummy.BookingsReferencesCreation(increment);