Skip to content

Commit

Permalink
Add testing on net9 & update package versions (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianEdwards authored Dec 13, 2024
1 parent d0bb85f commit 037b681
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
23 changes: 14 additions & 9 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="RazorSlices" Version="0.7.0" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Microsoft.Extensions.ApiDescription.Server" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.11" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.100",
"rollForward": "latestFeature",
"allowPrerelease": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand Down
3 changes: 3 additions & 0 deletions samples/RazorSlices.Samples.WebApp/Slices/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
@(await RenderPartialAsync<_FooterLinks>()) |
@await RenderSectionAsync("footer-links")
<a href="https://github.com/DamianEdwards/RazorSlices"><span class="text-muted">RazorSlices</span></a>
<p class="text-muted small">
@System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
</p>
</div>
</footer>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
Expand Down
6 changes: 3 additions & 3 deletions tests/RazorSlices.Tests/BufferWriterHtmlWritingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class BufferWriterHtmlWritingTests
private static readonly TimeSpan _timeout = Debugger.IsAttached ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(5000);

[Fact]
public async ValueTask HtmlEncodeAndWrite_DoesNotEncodeTextWhenPassedNullEncoder()
public async Task HtmlEncodeAndWrite_DoesNotEncodeTextWhenPassedNullEncoder()
{
var bufferStream = new MemoryStream(512);
var pipeWriter = PipeWriter.Create(bufferStream);
Expand All @@ -27,7 +27,7 @@ public async ValueTask HtmlEncodeAndWrite_DoesNotEncodeTextWhenPassedNullEncoder
}

[Fact]
public async ValueTask HtmlEncodeAndWrite_DoesNotEncodeTextThatRequiresNoEncoding()
public async Task HtmlEncodeAndWrite_DoesNotEncodeTextThatRequiresNoEncoding()
{
var bufferStream = new MemoryStream(512);
var pipeWriter = PipeWriter.Create(bufferStream);
Expand All @@ -42,7 +42,7 @@ public async ValueTask HtmlEncodeAndWrite_DoesNotEncodeTextThatRequiresNoEncodin
}

[Fact]
public async ValueTask HtmlEncodeAndWrite_EncodesSimpleText()
public async Task HtmlEncodeAndWrite_EncodesSimpleText()
{
var bufferStream = new MemoryStream(512);
var pipeWriter = PipeWriter.Create(bufferStream);
Expand Down

0 comments on commit 037b681

Please sign in to comment.