Skip to content

Commit 6509913

Browse files
author
babisque
committed
tests warnings are fixed now and the git workflow is updated
1 parent ab908f2 commit 6509913

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/dotnet.yml

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ jobs:
2626
- name: Build
2727
run: dotnet build --no-restore
2828
working-directory: ./Catalog/
29+
- name: Test
30+
run: dotnet test --no-build --verbosity normal
31+
working-directory: ./Catalog/

Catalog/Catalog.Test/ProductControllerTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public async Task GetProduct_NonExistingId_ReturnsNotFound()
141141
{
142142
// Arrange
143143
_productRepositoryMock.Setup(repo => repo.GetByIdAsync(1))
144-
.ReturnsAsync((Product)null);
144+
.ReturnsAsync((Product)null!);
145145

146146
// Act
147147
var result = await _controller.GetProduct(1);
@@ -196,7 +196,7 @@ public async Task Delete_NonExistingId_ReturnsNotFound()
196196
{
197197
// Arrange
198198
_productRepositoryMock.Setup(repo => repo.GetByIdAsync(1))
199-
.ReturnsAsync((Product)null);
199+
.ReturnsAsync((Product)null!);
200200

201201
// Act
202202
var result = await _controller.Delete(1);

0 commit comments

Comments
 (0)