Skip to content

Commit

Permalink
Using same name
Browse files Browse the repository at this point in the history
  • Loading branch information
wAsnk committed Nov 29, 2023
1 parent 2c977ba commit 9dc4ed2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Lombiq.OrchardCoreApiClient.Tester/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class Program
public static async Task Main(string[] arguments)
{
var port = int.TryParse(arguments.FirstOrDefault(), out var customPort) ? customPort : 44335;
using var apiClient = new OrchardCoreApiClient(new ApiClientSettings
using var apiClient = new ApiClient(new ApiClientSettings
{
ClientId = ClientId,
ClientSecret = ClientSecret,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static async Task TestOrchardCoreApiClientBehaviorAsync(
Category = "UI Test Tenants - Edited",
};

using var apiClient = new OrchardCoreApiClient(new ApiClientSettings
using var apiClient = new ApiClient(new ApiClientSettings
{
ClientId = clientId,
ClientSecret = clientSecret,
Expand Down Expand Up @@ -106,7 +106,7 @@ public static async Task TestOrchardCoreApiClientBehaviorAsync(

private static async Task TestTenantCreateAsync(
UITestContext context,
OrchardCoreApiClient apiClient,
ApiClient apiClient,
TenantApiModel createApiModel)
{
using (var response = await apiClient.OrchardCoreApi.CreateAsync(createApiModel))
Expand Down Expand Up @@ -141,7 +141,7 @@ private static async Task TestTenantCreateAsync(

private static async Task TestTenantSetupAsync(
UITestContext context,
OrchardCoreApiClient apiClient,
ApiClient apiClient,
TenantApiModel createApiModel,
TenantSetupApiModel setupApiModel)
{
Expand All @@ -159,7 +159,7 @@ private static async Task TestTenantSetupAsync(

private static async Task TestTenantEditAsync(
UITestContext context,
OrchardCoreApiClient apiClient,
ApiClient apiClient,
TenantApiModel editModel,
TenantSetupApiModel setupApiModel)
{
Expand All @@ -186,7 +186,7 @@ private static async Task TestTenantEditAsync(

private static async Task TestTenantDisableAsync(
UITestContext context,
OrchardCoreApiClient apiClient,
ApiClient apiClient,
TenantApiModel editModel)
{
await apiClient.OrchardCoreApi.DisableAsync(editModel.Name);
Expand All @@ -199,7 +199,7 @@ private static async Task TestTenantDisableAsync(

private static async Task TestTenantRemoveAsync(
UITestContext context,
OrchardCoreApiClient apiClient,
ApiClient apiClient,
TenantApiModel editModel)
{
await apiClient.OrchardCoreApi.RemoveAsync(editModel.Name);
Expand Down
8 changes: 8 additions & 0 deletions Lombiq.OrchardCoreApiClient/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

namespace Lombiq.OrchardCoreApiClient;

public class ApiClient : ApiClient<IOrchardCoreApi>
{
public ApiClient(ApiClientSettings apiClientSettings)
: base(apiClientSettings)
{
}
}

public class ApiClient<TApi> : IDisposable
where TApi : IOrchardCoreApi
{
Expand Down
12 changes: 0 additions & 12 deletions Lombiq.OrchardCoreApiClient/OrchardCoreApiClient.cs

This file was deleted.

0 comments on commit 9dc4ed2

Please sign in to comment.