private void InsertEntities(int nbEntities, int firstId, IAsyncNoSQLRepository <TestEntity> repo) { for (int i = 1; i <= nbEntities; i++) { Console.WriteLine(i); TestEntity e = new TestEntity { Id = (firstId + i).ToString(), PoidsDouble = Faker.RandomNumber.Next(), NumberOfChildenInt = Faker.RandomNumber.Next(), Name = Faker.Name.FullName() }; repo.InsertOne(e); } }
public AsyncNoSQLCoreUnitTests(IAsyncNoSQLRepository <TestEntity> entityRepo, IAsyncNoSQLRepository <TestEntity> entityRepo2, IAsyncNoSQLRepository <TestExtraEltEntity> entityExtraEltRepo, IAsyncNoSQLRepository <CollectionTest> collectionEntityRepo, string baseFilePath) { this.entityRepo = entityRepo; this.entityRepo2 = entityRepo2; this.entityExtraEltRepo = entityExtraEltRepo; this.collectionEntityRepo = collectionEntityRepo; this.entityRepo.TruncateCollection(); this.entityExtraEltRepo.TruncateCollection(); this.collectionEntityRepo.TruncateCollection(); this.baseFilePath = baseFilePath; }