From 9f96e36224e31f8840014716167ed6a7321984fa Mon Sep 17 00:00:00 2001 From: Chris Simmons Date: Fri, 29 Mar 2024 17:08:02 -0700 Subject: [PATCH] Refactor --- GettyImages.Api/AiGenerator/ImageGenerations.cs | 2 +- IntegrationTests/AiGeneratorTests.cs | 2 +- UnitTests/AiGenerator/GenerateImagesTests.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GettyImages.Api/AiGenerator/ImageGenerations.cs b/GettyImages.Api/AiGenerator/ImageGenerations.cs index 5675541..8c9b1a7 100644 --- a/GettyImages.Api/AiGenerator/ImageGenerations.cs +++ b/GettyImages.Api/AiGenerator/ImageGenerations.cs @@ -21,7 +21,7 @@ internal static ImageGenerations GetInstance(Credentials credentials, string bas return new ImageGenerations(credentials, baseUrl, customHandler); } - public ImageGenerations With(ImageGenerationsRequest value) + public ImageGenerations WithImageGenerationsRequest(ImageGenerationsRequest value) { BodyParameter = value; return this; diff --git a/IntegrationTests/AiGeneratorTests.cs b/IntegrationTests/AiGeneratorTests.cs index 375b7de..081d1d5 100644 --- a/IntegrationTests/AiGeneratorTests.cs +++ b/IntegrationTests/AiGeneratorTests.cs @@ -147,7 +147,7 @@ public async Task InitializeAsync() ImageGenerationsResponse = await ApiClient .GetApiClientWithResourceOwnerCredentials(ApiKey, ApiSecret, UserName, UserPassword) .ImageGenerations() - .With(new ImageGenerationsRequest + .WithImageGenerationsRequest(new ImageGenerationsRequest { Prompt = "a prompt", Mood = ImageGenerationsMood.Dramatic, diff --git a/UnitTests/AiGenerator/GenerateImagesTests.cs b/UnitTests/AiGenerator/GenerateImagesTests.cs index 9d2afdc..9b8cebb 100644 --- a/UnitTests/AiGenerator/GenerateImagesTests.cs +++ b/UnitTests/AiGenerator/GenerateImagesTests.cs @@ -17,7 +17,7 @@ public async Task InitializeAsync() var testHandler = TestUtil.CreateTestHandler(); await ApiClient.GetApiClientWithClientCredentials("apiKey", "apiSecret", testHandler) .ImageGenerations() - .With(new ImageGenerationsRequest + .WithImageGenerationsRequest(new ImageGenerationsRequest { Prompt = "a prompt", Mood = ImageGenerationsMood.Dramatic,