Skip to content

Commit

Permalink
rename folders and files, update remaining legacy references
Browse files Browse the repository at this point in the history
  • Loading branch information
pokornyd committed Mar 7, 2024
1 parent d9a70ed commit 24e60b5
Show file tree
Hide file tree
Showing 27 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Kontent.Ai.Management.Helpers/EditLinkBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private ManagementHelpersOptions ManagementHelpersOptions
/// <summary>
/// Initializes a new instance of the <see cref="EditLinkBuilder"/> class for retrieving edit urls.
/// </summary>
/// <param name="managementHelpersOptions">The settings of the Kontent.ai project.</param>
/// <param name="managementHelpersOptions">The settings of the Kontent.ai environment.</param>
public EditLinkBuilder(ManagementHelpersOptions managementHelpersOptions)
{
if (string.IsNullOrEmpty(managementHelpersOptions.AdminUrl))
Expand All @@ -43,12 +43,12 @@ public EditLinkBuilder(ManagementHelpersOptions managementHelpersOptions)

if (string.IsNullOrEmpty(managementHelpersOptions.EnvironmentId))
{
throw new ArgumentException("Kontent.ai project identifier is not specified.", nameof(managementHelpersOptions.EnvironmentId));
throw new ArgumentException("Kontent.ai environment identifier is not specified.", nameof(managementHelpersOptions.EnvironmentId));
}

if (!Guid.TryParse(managementHelpersOptions.EnvironmentId, out _))
{
throw new ArgumentException($"Provided string is not a valid project identifier ({managementHelpersOptions.EnvironmentId}).", nameof(managementHelpersOptions.EnvironmentId));
throw new ArgumentException($"Provided string is not a valid environment identifier ({managementHelpersOptions.EnvironmentId}).", nameof(managementHelpersOptions.EnvironmentId));
}

ManagementHelpersOptions = managementHelpersOptions;
Expand All @@ -57,7 +57,7 @@ public EditLinkBuilder(ManagementHelpersOptions managementHelpersOptions)
/// <summary>
/// Initializes a new instance of the <see cref="EditLinkBuilder"/> class for retrieving edit urls.
/// </summary>
/// <param name="managementHelpersOptions">The settings of the Kontent.ai project.</param>
/// <param name="managementHelpersOptions">The settings of the Kontent.ai environment.</param>
public EditLinkBuilder(IOptionsMonitor<ManagementHelpersOptions> managementHelpersOptions)
{
managementHelpersOptionsMonitor = managementHelpersOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace Kontent.Ai.Management.Tests.ManagementClientTests;

public class ProjectUserTests : IClassFixture<FileSystemFixture>
public class EnvironmentUserTests : IClassFixture<FileSystemFixture>
{
private readonly Scenario _scenario;

public ProjectUserTests()
public EnvironmentUserTests()
{
_scenario = new Scenario(folder: "ProjectUser");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Kontent.Ai.Management.Tests.Modules.UrlBuilder;
public partial class EndpointUrlBuilderTests
{
[Fact]
public void BuildProjectRolesUrl_ReturnsCorrectUrl()
public void BuildEnvironmentRolesUrl_ReturnsCorrectUrl()
{
var actualUrl = _builder.BuildEnvironmentRolesUrl();
var expectedUrl = $"{ENDPOINT}/projects/{ENVIRONMENT_ID}/roles";
Expand All @@ -16,7 +16,7 @@ public void BuildProjectRolesUrl_ReturnsCorrectUrl()
}

[Fact]
public void BuildProjectRoleUrl_WithId_ReturnsCorrectUrl()
public void BuildEnvironmentRoleUrl_WithId_ReturnsCorrectUrl()
{
var roleIdentifier = Reference.ById(Guid.NewGuid());
var actualUrl = _builder.BuildEnvironmentRoleUrl(roleIdentifier);
Expand All @@ -26,7 +26,7 @@ public void BuildProjectRoleUrl_WithId_ReturnsCorrectUrl()
}

[Fact]
public void BuildProjectRoleUrl_WithCodename_ReturnsCorrectUrl()
public void BuildEnvironmentRoleUrl_WithCodename_ReturnsCorrectUrl()
{
var roleIdentifier = Reference.ByCodename("codename");
var actualUrl = _builder.BuildEnvironmentRoleUrl(roleIdentifier);
Expand All @@ -36,7 +36,7 @@ public void BuildProjectRoleUrl_WithCodename_ReturnsCorrectUrl()
}

[Fact]
public void BuildProjectRoleUrl_WithExternalId_Throws()
public void BuildEnvironmentRoleUrl_WithExternalId_Throws()
{
var roleIdentifier = Reference.ByExternalId("external");
Assert.Throws<InvalidOperationException>(() => _builder.BuildEnvironmentRoleUrl(roleIdentifier));
Expand Down
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/Extensions/ListingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class ListingExtensions
/// </summary>
/// <typeparam name="T">Entity model e.g <see cref="LanguageModel"/>, <see cref="TaxonomyGroupModel"/> and etc.</typeparam>
/// <param name="method">To be extended method that returns <see cref="Task{IListingResponseModel}"/></param>
/// <returns><see cref="List{T}"/> all items for project</returns>
/// <returns><see cref="List{T}"/> all items for environment</returns>
public async static Task<List<T>> GetAllAsync<T>(this Task<IListingResponseModel<T>> method)
{
var result = new List<T>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TypeIssue
public Metadata Type { get; set; }

/// <summary>
/// Gets or sets information about project language
/// Gets or sets information about environment language
/// </summary>
[JsonProperty("issues")]
public IEnumerable<ElementIssue> Issues { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ public sealed class SubscriptionProjectModel
/// Gets or sets the project's environments.
/// </summary>
[JsonProperty("environments")]
public IEnumerable<SubscriptionProjectEnvironmentModel> Environmnets { get; set; }
public IEnumerable<SubscriptionProjectEnvironmentModel> Environments { get; set; }
}

0 comments on commit 24e60b5

Please sign in to comment.