示例#1
0
        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);
            }
        }
示例#2
0
        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;
        }