Skip to content

Commit

Permalink
test: use FluentAssertions.Web
Browse files Browse the repository at this point in the history
  • Loading branch information
mu88 committed Jan 24, 2025
1 parent 83cf548 commit 74874e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PackageVersion Include="bunit" Version="1.38.5" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
<PackageVersion Include="FluentAssertions" Version="8.0.0" />
<PackageVersion Include="FluentAssertions.Web.v8" Version="1.8.0"/>
<PackageVersion Include="IDisposableAnalyzers" Version="4.0.8" />
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.186" />
<PackageVersion Include="Microsoft.AspNetCore.Components.CustomElements" Version="9.0.1" />
Expand Down
4 changes: 2 additions & 2 deletions src/Tests/System/SystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ private static IContainer BuildAppContainer(INetwork network) =>

private static async Task AppShouldRunAsync(HttpResponseMessage appResponse, CancellationToken cancellationToken)
{
appResponse.StatusCode.Should().Be(HttpStatusCode.OK);
appResponse.Should().Be200Ok();
(await appResponse.Content.ReadAsStringAsync(cancellationToken)).Should().Contain("<title>This is your life</title>");
}

private static async Task HealthCheckShouldBeHealthyAsync(HttpResponseMessage healthCheckResponse, CancellationToken cancellationToken)
{
healthCheckResponse.StatusCode.Should().Be(HttpStatusCode.OK);
healthCheckResponse.Should().Be200Ok();
(await healthCheckResponse.Content.ReadAsStringAsync(cancellationToken)).Should().Be("Healthy");
}

Expand Down
1 change: 1 addition & 0 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="FluentAssertions.Web.v8"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="NSubstitute.Analyzers.CSharp">
Expand Down

0 comments on commit 74874e4

Please sign in to comment.