Skip to content

Commit

Permalink
update dependencies, fix GetCurrentUserAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasPe committed Mar 13, 2024
1 parent 810ebb8 commit ae4f7b9
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
6 changes: 3 additions & 3 deletions WordPressPCL.Tests.Hosted/WordPressPCL.Tests.Hosted.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions WordPressPCL.Tests.Selfhosted/Comments_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task Comments_Create()
var posts = await _clientAuth.Posts.GetAllAsync();
var postId = posts.First().Id;

var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();

// Create random content to prevent duplicate commment errors
var content = $"TestComment {System.Guid.NewGuid()}";
Expand Down Expand Up @@ -91,7 +91,7 @@ public async Task Comments_Get()
[TestMethod]
public async Task Comments_Update()
{
var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();
var queryBuilder = new CommentsQueryBuilder()
{
Authors = new List<int> { me.Id }
Expand All @@ -114,7 +114,7 @@ public async Task Comments_Delete()
var posts = await _clientAuth.Posts.GetAllAsync();
var postId = posts.First().Id;

var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();

// Create random content to prevent duplicate commment errors
var comment = new Comment()
Expand Down Expand Up @@ -155,7 +155,7 @@ public async Task Comments_Query_Pending()
// Create new pending comment
var posts = await _clientAuth.Posts.GetAllAsync();
var postId = posts.First().Id;
var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();

// Create random content to prevent duplicate commment errors
var content = $"TestComment {System.Guid.NewGuid()}";
Expand Down Expand Up @@ -194,7 +194,7 @@ public async Task Comments_Query_Pending()
[TestMethod]
public async Task Comments_GetAllForPost()
{
var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();

// create test post and add comments
var post = new Post()
Expand Down
2 changes: 1 addition & 1 deletion WordPressPCL.Tests.Selfhosted/User_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public async Task Users_Delete()
{
var user = await CreateRandomUser();
Assert.IsNotNull(user);
var me = await _clientAuth.Users.GetCurrentUser();
var me = await _clientAuth.Users.GetCurrentUserAsync();
var response = await _clientAuth.Users.Delete(user.Id, me.Id);
Assert.IsTrue(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion WordPressPCL/Client/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public async Task<User> UpdateAsync(User Entity)
/// Get current User
/// </summary>
/// <returns>Current User</returns>
public Task<User> GetCurrentUser()
public Task<User> GetCurrentUserAsync()
{
return _httpHelper.GetRequestAsync<User>($"{METHOD_PATH}/me", true, true);
}
Expand Down
10 changes: 7 additions & 3 deletions WordPressPCL/WordPressPCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
<RepositoryType>GitHub</RepositoryType>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<Version>2.0.2</Version>
<Version>2.1.0</Version>
<PackageLicenseUrl></PackageLicenseUrl>
<LangVersion>9.0</LangVersion>
<PackageReleaseNotes>V2.0.2
<PackageReleaseNotes>V2.1.0
- Upgraded dependencies
- Fix GetCurrentUserAsync() naming

V2.0.2
- Support for Plugins
- Support for Statuses in UsersQueryBuilder
- Upgraded Newtonsoft.Json dependency to 13.0.3
Expand Down Expand Up @@ -139,7 +143,7 @@ V1.2
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion WordPressPCL/WordPressPCL.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae4f7b9

Please sign in to comment.