Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad Alizada committed Jan 3, 2023
1 parent 6c1216d commit 35c013e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ArmTemplates/Common/API/Utils/ApiClientUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public ApiClientUtils(IApisClient apisClient, ILogger<ApiClientUtils> logger)
return apiDictionary;
}

public async Task<ApiTemplateResource> GetsingleApi(string apiName, ExtractorParameters extractorParameters)
public async Task<ApiTemplateResource> GetSingleApi(string apiName, ExtractorParameters extractorParameters)
{
var serviceApi = await this.apisClient.GetSingleAsync(apiName, extractorParameters);

Expand All @@ -82,7 +82,7 @@ public async Task<bool> DoesApiReferenceGatewayAsync(string singleApiName, strin
return false;
}

var serviceApi = await this.GetsingleApi(singleApiName, extractorParameters);
var serviceApi = await this.GetSingleApi(singleApiName, extractorParameters);

return gatewayApis.Any(gatewayApi => gatewayApi.Name == serviceApi.Name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ArmTemplates/Common/API/Utils/IApiClientUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IApiClientUtils
{
Task<Dictionary<string, List<string>>> GetAllAPIsDictionaryByVersionSetName(ExtractorParameters extractorParameters);

Task<ApiTemplateResource> GetsingleApi(string apiName, ExtractorParameters extractorParameters);
Task<ApiTemplateResource> GetSingleApi(string apiName, ExtractorParameters extractorParameters);

Task<bool> DoesApiReferenceGatewayAsync(string singleApiName, string gatewayName, ExtractorParameters extractorParameters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public class GatewayApiExtractor : IGatewayApiExtractor

if (!string.IsNullOrEmpty(singleApiName))
{
var serviceApi = await this.apiClientUtils.GetsingleApi(singleApiName, extractorParameters);
var serviceApi = await this.apiClientUtils.GetSingleApi(singleApiName, extractorParameters);

// inluding only api with singleApiName
// including only api with singleApiName
var apis = gatewayApis.Where(x => x.Name == serviceApi.Name).ToList();
if (!apis.IsNullOrEmpty())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public async Task GenerateGatewayApisTemplates_ProperlyLaysTheInformation()
}

[Fact]
public async Task GenerateGatewayApisTemplates_ProperlyLaysTheInformation_GivenApiNameParameterIsGiven()
public async Task GenerateGatewayApisTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterIsGiven()
{
// arrange
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayApisTemplates_ProperlyLaysTheInformation_GivenApiNameParameterIsGiven));
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayApisTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterIsGiven));
var apiName = "api-name";
var extractorConfig = this.GetDefaultExtractorConsoleAppConfiguration(
extractGateways: "true",
Expand Down Expand Up @@ -137,10 +137,10 @@ public async Task GenerateGatewayApisTemplates_ProperlyLaysTheInformation_GivenA
}

[Fact]
public async Task GenerateGatewayApisTemplates_ProperlyLaysTheInformation_GivenApiNameParameterIsEmpty()
public async Task GenerateGatewayApisTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterIsEmpty()
{
// arrange
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayApisTemplates_ProperlyLaysTheInformation_GivenApiNameParameterIsEmpty));
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayApisTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterIsEmpty));
var extractorConfig = this.GetDefaultExtractorConsoleAppConfiguration(
extractGateways: "true",
apiName: string.Empty);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public async Task GenerateGatewayTemplates_ProperlyLaysTheInformation()


[Fact]
public async Task GenerateGatewayTemplates_ProperlyLaysTheInformation_GivenApiNameParameterExists()
public async Task GenerateGatewayTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterExists()
{
// arrange
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayTemplates_ProperlyLaysTheInformation_GivenApiNameParameterExists));
var currentTestDirectory = Path.Combine(this.OutputDirectory, nameof(GenerateGatewayTemplates_GeneratesTemplatesCorrectly_GivenApiNameParameterExists));
var apiName = "api-name";
var extractorConfig = this.GetDefaultExtractorConsoleAppConfiguration(
apiName: apiName,
Expand Down

0 comments on commit 35c013e

Please sign in to comment.