public TableStorageRepositoryTest(string tableName = DefaultTableName)
 {
     Settings = new DevelopmentTableStorageSettings {
         TableName = tableName
     };
     RepositoryUnderTest = new TableStorageRepository <SomeTestEntity>(Settings);
 }
Пример #2
0
        public ITableStorageRepository <TModel> CreateRepository <TModel>()
            where TModel : class, ITableEntity, new()
        {
            var repo = _serviceProvider.GetService <ITableStorageRepository <TModel> >();

            if (_settings.AutoCreateMissingBindings && repo == null)
            {
                var storageSettings = _serviceProvider.GetService <ITableStorageSettings>();
                repo = new TableStorageRepository <TModel>(storageSettings);
            }
            return(repo);
        }
 public MergeAsync()
 {
     SomeOtherTestEntityRepository = new TableStorageRepository <SomeOtherTestEntity>(Settings);
 }
Пример #4
0
 public FilterableTableStorageReaderTest()
 {
     _settings = new CosmosDbLocalEmulatorSettings("FilterableTableStorageReaderTest");
     sut       = new FilterableTableStorageReader <MyTestModel>(_settings);
     _myTestModelRepository = new TableStorageRepository <MyTestModel>(_settings);
 }
Пример #5
0
 public TableStorageRepositoryTest(string tableName = DefaultTableName)
 {
     Settings            = new CosmosDbLocalEmulatorSettings(tableName);
     RepositoryUnderTest = new TableStorageRepository <SomeTestEntity>(Settings);
 }