Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade the Contentful nuget package to 7.3.0 #273

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="contentful.csharp" Version="7.2.12" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.16" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,25 @@ public void Calls_Base_SyncNextResult()
_contentfulClient.Received().SyncNextResult(Arg.Any<string>(), default);
}

[Test]
public void Calls_Base_GetTag()
{
// act
_cpdClient.GetTag(string.Empty, default);

// assert
_contentfulClient.Received().GetTag(Arg.Any<string>(), default);
}

[Test]
public void Calls_Base_GetTags()
{
// act
_cpdClient.GetTags(string.Empty, default);

// assert
_contentfulClient.Received().GetTags(Arg.Any<string>(), default);
}

#endregion
}
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<InternalsVisibleTo Include="Childrens-Social-Care-CPD-Tests" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="contentful.aspnetcore" Version="7.2.12" />
<PackageReference Include="contentful.aspnetcore" Version="7.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="7.0.11" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
Expand Down
10 changes: 10 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ public Task<Space> GetSpace(CancellationToken cancellationToken = default)
return _client.GetSpace(cancellationToken);
}

public Task<ContentTag> GetTag(string tagId, CancellationToken cancellationToken = default)
{
return _client.GetTag(tagId, cancellationToken);
}

public Task<IEnumerable<ContentTag>> GetTags(string queryString = "", CancellationToken cancellationToken = default)
{
return _client.GetTags(queryString, cancellationToken);
}

public Task<SyncResult> SyncInitial(SyncType syncType = SyncType.All, string contentTypeId = "", CancellationToken cancellationToken = default, int? limit = null)
{
return _client.SyncInitial(syncType, contentTypeId, cancellationToken, limit);
Expand Down