Skip to content

Commit 717b3e4

Browse files
Resolve bug in APIView (#8177)
1 parent 8895358 commit 717b3e4

3 files changed

Lines changed: 11 additions & 14 deletions

File tree

src/dotnet/APIView/APIView/Analysis/Analyzer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public Analyzer()
2020
_analyzers.Add(new ClientMethodsAnalyzer());
2121
_analyzers.Add(new ClientConstructorAnalyzer());
2222
_analyzers.Add(new ClientOptionsAnalyzer());
23-
_analyzers.Add(new ClientAssemblyNamespaceAnalyzer());
2423
_analyzers.Add(new BannedAssembliesAnalyzer());
2524
_analyzers.Add(new TypeNameAnalyzer());
2625
}

src/dotnet/APIView/APIViewIntegrationTests/RepositoryTests/CosmosPullRequestRepositoryTests.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/dotnet/APIView/APIViewIntegrationTests/RepositoryTests/CosmosReviewRepositoryTests.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,25 @@ namespace APIViewIntegrationTests.RepositoryTests
1313
{
1414
public class CosmosReviewRepositoryTestsBaseFixture : IDisposable
1515
{
16-
private IConfigurationRoot _config;
1716
private readonly CosmosClient _cosmosClient;
1817
private readonly string _cosmosDBname;
1918
public CosmosReviewRepository ReviewRepository { get; private set; }
2019

2120
public CosmosReviewRepositoryTestsBaseFixture()
2221
{
23-
var _config = new ConfigurationBuilder()
22+
var config = new ConfigurationBuilder()
2423
.AddEnvironmentVariables(prefix: "APIVIEW_")
2524
.AddUserSecrets(typeof(TestsBaseFixture).Assembly)
2625
.Build();
2726

2827
_cosmosDBname = "CosmosReviewRepositoryTestsDB";
29-
_config["CosmosDBName"] = _cosmosDBname;
28+
config["CosmosDBName"] = _cosmosDBname;
3029

31-
_cosmosClient = new CosmosClient(_config["Cosmos:ConnectionString"]);
32-
var dataBaseResponse = _cosmosClient.CreateDatabaseIfNotExistsAsync(_config["CosmosDBName"]).Result;
30+
_cosmosClient = new CosmosClient(config["Cosmos:ConnectionString"]);
31+
var dataBaseResponse = _cosmosClient.CreateDatabaseIfNotExistsAsync(config["CosmosDBName"]).Result;
3332
dataBaseResponse.Database.CreateContainerIfNotExistsAsync("Reviews", "/id").Wait();
3433

35-
ReviewRepository = new CosmosReviewRepository(_config, _cosmosClient);
34+
ReviewRepository = new CosmosReviewRepository(config, _cosmosClient);
3635
PopulateDBWithDummyReviewData().Wait();
3736
}
3837

0 commit comments

Comments
 (0)