@@ -13,29 +13,28 @@ namespace APIViewIntegrationTests.RepositoryTests
1313{
1414 public class CosmosPullRequestRepositoryTestsBaseFixture : IDisposable
1515 {
16- private IConfigurationRoot _config ;
1716 private readonly CosmosClient _cosmosClient ;
1817 private readonly string _cosmosDBname ;
1918 public CosmosPullRequestsRepository PullRequestRepositopry { get ; private set ; }
2019 public CosmosReviewRepository ReviewRepository { get ; private set ; }
2120
2221 public CosmosPullRequestRepositoryTestsBaseFixture ( )
2322 {
24- var _config = new ConfigurationBuilder ( )
23+ var config = new ConfigurationBuilder ( )
2524 . AddEnvironmentVariables ( prefix : "APIVIEW_" )
2625 . AddUserSecrets ( typeof ( TestsBaseFixture ) . Assembly )
2726 . Build ( ) ;
2827
2928 _cosmosDBname = "CosmosPullRequestRepositoryTestsDB" ;
30- _config [ "CosmosDBName" ] = _cosmosDBname ;
29+ config [ "CosmosDBName" ] = _cosmosDBname ;
3130
32- _cosmosClient = new CosmosClient ( _config [ "Cosmos:ConnectionString" ] ) ;
33- var dataBaseResponse = _cosmosClient . CreateDatabaseIfNotExistsAsync ( _config [ "CosmosDBName" ] ) . Result ;
31+ _cosmosClient = new CosmosClient ( config [ "Cosmos:ConnectionString" ] ) ;
32+ var dataBaseResponse = _cosmosClient . CreateDatabaseIfNotExistsAsync ( config [ "CosmosDBName" ] ) . Result ;
3433 dataBaseResponse . Database . CreateContainerIfNotExistsAsync ( "Reviews" , "/id" ) . Wait ( ) ;
3534 dataBaseResponse . Database . CreateContainerIfNotExistsAsync ( "PullRequests" , "/ReviewId" ) . Wait ( ) ;
3635
37- ReviewRepository = new CosmosReviewRepository ( _config , _cosmosClient ) ;
38- PullRequestRepositopry = new CosmosPullRequestsRepository ( _config , ReviewRepository , _cosmosClient ) ;
36+ ReviewRepository = new CosmosReviewRepository ( config , _cosmosClient ) ;
37+ PullRequestRepositopry = new CosmosPullRequestsRepository ( config , ReviewRepository , _cosmosClient ) ;
3938 PopulateDBWithDummyPullRequestData ( ) . Wait ( ) ;
4039 PopulateDBWithDummyReviewData ( ) . Wait ( ) ;
4140 }
0 commit comments