using AsbCloudDb.Model; using Bogus; namespace AsbCloudWebApi.IntegrationTests.TestFakers; public static class DepositTestFaker { public static Deposit GetDeposit() => GetDepositFaker().Generate(); public static IEnumerable GetDeposits(int count) => GetDepositFaker().Generate(count); private static Faker GetDepositFaker() => new Faker() .RuleFor(d => d.Id, 0) .RuleFor(d => d.Caption, f => f.Random.String2(1, 50)) .RuleFor(d => d.Latitude, f => f.Random.Int(-90, 90)) .RuleFor(d => d.Longitude, f => f.Random.Int(-180, 180)) .RuleFor(d => d.Timezone, f => new SimpleTimezone { Hours = f.Random.Int(1, 12), IsOverride = f.Random.Bool() }); }