public static async Task Initialize(TestContext testContext) { context = new MyMemoryDbContext(); for (var i = 0; i < 50; i++) { var user = await context.Users.Put(new User() { Id = ShortGuid.NewId(), Name = $"User{i}", Email = $"user{i}@user.com", PasswordHash = $"{((i*Math.PI)%i).GetHashCode().ToString()}", }); for (var e = 0; e < 100; e++) { var entity = await context.OwnedEntities.Put(new OwnedEntity() { OwnerId = user.Id, Id = ShortGuid.NewId(), Created = DateTime.UtcNow, Name = $"OwnedEntity{e}" }); } for (var e = 0; e < 100; e++) { var entity = await context.Entities <OwnedEntity2>().Put(new OwnedEntity2() { OwnerId = user.Id, Id = ShortGuid.NewId(), Created = DateTime.UtcNow, Name = $"OwnedEntity2{e}" }); } if (i == 34) { userId = user.Id; } } }
public static async Task Initialize(TestContext testContext) { Environment.SetEnvironmentVariable("AWS_ENABLE_ENDPOINT_DISCOVERY", "false"); context = new MyDynamoContext(); }