Skip to content

Commit

Permalink
TEST-0003 Fix test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hwinther committed Jun 23, 2024
1 parent 6d82795 commit ea5a4ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,13 @@ jobs:
run: dotnet test ../../tests/backend/WebApi.Tests --no-restore --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" /p:CollectCoverage=true /p:CoverletOutput="../../tests/backend/WebApi.Tests/TestResults/" /p:CoverletOutputFormat=cobertura
continue-on-error: true

- uses: hwinther/test-reporter@dotnet-nunit # TODO: set back to original once nunit is supported: dorny/test-reporter@v1
#- uses: hwinther/test-reporter@dotnet-nunit # TODO: set back to original once nunit is supported: dorny/test-reporter@v1
- uses: dorny/test-reporter@v1
id: test-reporter
with:
name: "WebApi Tests"
path: "tests/backend/WebApi.Tests/TestResults/test-results.trx"
reporter: dotnet-nunit
reporter: dotnet-trx # dotnet-nunit
fail-on-error: false

- name: Generate report for all tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ public async Task GetBlog_ValidId_ReturnsBlog()

// Assert
Assert.That(result, Is.InstanceOf<ActionResult<BlogDto>>());
var okResult = result.Result as OkObjectResult;
Assert.That(okResult, Is.Not.Null);
var returnedBlog = okResult.Value as BlogDto;
var returnedBlog = result.Value;
Assert.That(returnedBlog, Is.Not.Null);
Assert.Multiple(() =>
{
Expand Down

0 comments on commit ea5a4ae

Please sign in to comment.