public NoSQLCoreUnitTests(INoSQLRepository <Log> entityRepo,
                                  string baseFilePath)
        {
            this.entityRepo = entityRepo;

            this.entityRepo.TruncateCollection();

            this.baseFilePath = baseFilePath;
        }
        private void InsertEntities(int nbEntities, int firstId, INoSQLRepository <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 NoSQLCoreUnitTests(INoSQLRepository <TestEntity> entityRepo,
                                  INoSQLRepository <TestEntity> entityRepo2,
                                  INoSQLRepository <TestExtraEltEntity> entityExtraEltRepo,
                                  string baseFilePath,
                                  string dbName)
        {
            this.entityRepo         = entityRepo;
            this.entityRepo2        = entityRepo2;
            this.entityExtraEltRepo = entityExtraEltRepo;

            this.entityRepo.TruncateCollection();
            this.entityExtraEltRepo.TruncateCollection();

            this.baseFilePath = baseFilePath;
            this.dbName       = dbName;
        }
 public StateImplements(INoSQLRepository <StateModel> noSQLRepository)
 {
     this.NoSQLRepository = noSQLRepository;
 }
Exemple #5
0
 public NoSqlLogger(INoSQLRepository <Log> repository, int?daysBeforeExpiration)
 {
     this.repository           = repository;
     this.daysBeforeExpiration = daysBeforeExpiration;
 }
Exemple #6
0
 public NoSqlLogger(INoSQLRepository <Log> repository)
     : this(repository, null)
 {
 }
 public void LoadRepo(INoSQLRepository <Log> repo)
 {
     this.repo = repo;
 }