Skip to content

Commit

Permalink
version bump to 3.0.4 (#31)
Browse files Browse the repository at this point in the history
* version bump to 3.0.4

* bump .Net version
  • Loading branch information
jtwotimes authored May 28, 2022
1 parent d2666c7 commit 0bfd37e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 3.0.4
### Fix
- Ensure HTTP responses are only processed after the content of the request has been read, instead of just the headers: [#29](https://github.com/mtrdp642/PokeApiNet/issues/29)
- Updated dependencies
- Bump test project to .Net 6.0

## 3.0.3
### Added
- Updated `Pokemon` model to include new property: `past_types`
Expand Down
16 changes: 8 additions & 8 deletions PokeApiNet.Tests/PokeApiClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public async Task GetResourceByIdCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetResourceAsync<Berry>(1, cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetResourceAsync<Berry>(1, cancellationToken); });
}

[Fact]
Expand All @@ -274,7 +274,7 @@ public async Task GetResourceByNameCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetResourceAsync<Berry>("cheri", cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetResourceAsync<Berry>("cheri", cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -441,7 +441,7 @@ public async Task UrlNavigationCancellationAsyncSingle()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assemble
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetResourceAsync(pikachu.Species, cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetResourceAsync(pikachu.Species, cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -553,7 +553,7 @@ public async Task UrlNavigationCancellationAllAsync()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetResourceAsync(item.Attributes, cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetResourceAsync(item.Attributes, cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -589,7 +589,7 @@ public async Task GetNamedResourcePageAsyncCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetNamedResourcePageAsync<Berry>(cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetNamedResourcePageAsync<Berry>(cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -625,7 +625,7 @@ public async Task GetNamedResourcePageLimitOffsetAsyncCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetNamedResourcePageAsync<Berry>(50, 2, cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetNamedResourcePageAsync<Berry>(50, 2, cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -661,7 +661,7 @@ public async Task GetApiResourcePageAsyncCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetApiResourcePageAsync<EvolutionChain>(cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetApiResourcePageAsync<EvolutionChain>(cancellationToken); });
}

[Fact]
Expand Down Expand Up @@ -697,7 +697,7 @@ public async Task GetApiResourcePageLimitOffsetAsyncCancellation()
CancellationToken cancellationToken = new CancellationToken(true);

// act / assert
await Assert.ThrowsAsync<OperationCanceledException>(async () => { await client.GetApiResourcePageAsync<EvolutionChain>(1, 50, cancellationToken); });
await Assert.ThrowsAsync<TaskCanceledException>(async () => { await client.GetApiResourcePageAsync<EvolutionChain>(1, 50, cancellationToken); });
}

private PokeApiClient CreateSut() => new PokeApiClient(mockHttp);
Expand Down
14 changes: 6 additions & 8 deletions PokeApiNet.Tests/PokeApiNet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>

<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 3 additions & 2 deletions PokeApiNet.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.168
# Visual Studio Version 17
VisualStudioVersion = 17.0.31912.275
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PokeApiNet", "PokeApiNet\PokeApiNet.csproj", "{5C6D2C6D-0A64-42DF-A118-F34425857413}"
EndProject
Expand All @@ -12,6 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PokeApiNet.Tests", "PokeApi
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{32DCA351-B9ED-4856-8468-CBF1C12BFBC8}"
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
LICENSE.md = LICENSE.md
README.md = README.md
EndProjectSection
Expand Down
12 changes: 6 additions & 6 deletions PokeApiNet/PokeApiNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>3.0.3</Version>
<Version>3.0.4</Version>
<Authors>JJ Banda</Authors>
<Company />
<Description>.Net client for the PokeAPI api</Description>
Expand All @@ -13,7 +13,7 @@
<PackageReleaseNotes>https://github.com/mtrdp642/PokeApiNet/blob/master/CHANGELOG.md</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>9.0</LangVersion>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand All @@ -31,10 +31,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- task: UseDotNet@2
inputs:
packageType: sdk
version: '5.x'
version: '6.x'
- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
Expand Down

0 comments on commit 0bfd37e

Please sign in to comment.