Skip to content

Commit

Permalink
#216 - Rename Update to Modify for PreviewConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
robertstebel authored and gormal committed Jan 30, 2023
1 parent f84edf8 commit 176637c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async void GetPreviewConfigurations_GetsPreviewConfiguration()
}

[Fact]
public async void UpdatePreviewConfiguration_UpdatesPreviewConfiguration()
public async void ModifyPreviewConfiguration_UpdatesPreviewConfiguration()
{
var newPreviewConfiguration = new PreviewConfigurationModel
{
Expand Down Expand Up @@ -57,7 +57,7 @@ public async void UpdatePreviewConfiguration_UpdatesPreviewConfiguration()
};

var client = _fileSystemFixture.CreateMockClientWithResponse("PreviewConfiguration.json");
var response = await client.UpdatePreviewConfigurationAsync(newPreviewConfiguration);
var response = await client.ModifyPreviewConfigurationAsync(newPreviewConfiguration);
var expected = _fileSystemFixture.GetExpectedResponse<PreviewConfigurationModel>("PreviewConfiguration.json");

response.Should().BeEquivalentTo(expected);
Expand Down
4 changes: 2 additions & 2 deletions Kontent.Ai.Management/IManagementClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@ public interface IManagementClient
Task<PreviewConfigurationModel> GetPreviewConfigurationAsync();

/// <summary>
/// Updates the preview configuration.
/// Modify the preview configuration.
/// </summary>
/// <param name="previewConfiguration">Represents configuration that will be used for project.</param>
/// <returns>The <see cref="PreviewConfigurationModel"/> instance that represents the preview configuration.</returns>
Task<PreviewConfigurationModel> UpdatePreviewConfigurationAsync(PreviewConfigurationModel previewConfiguration);
Task<PreviewConfigurationModel> ModifyPreviewConfigurationAsync(PreviewConfigurationModel previewConfiguration);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public async Task<PreviewConfigurationModel> GetPreviewConfigurationAsync()
}

/// <inheritdoc />
public async Task<PreviewConfigurationModel> UpdatePreviewConfigurationAsync(PreviewConfigurationModel previewConfiguration)
public async Task<PreviewConfigurationModel> ModifyPreviewConfigurationAsync(PreviewConfigurationModel previewConfiguration)
{
var endpointUrl = _urlBuilder.BuildPreviewConfigurationUrl();
return await _actionInvoker.InvokeMethodAsync<PreviewConfigurationModel, PreviewConfigurationModel >(endpointUrl, HttpMethod.Put, previewConfiguration);
Expand Down

0 comments on commit 176637c

Please sign in to comment.