Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hijtec committed Nov 12, 2024
1 parent f011cf6 commit e11217b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ToDoList/tests/ToDoList.Test/UnitTests/GetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace ToDoList.Test.UnitTests;
using ToDoList.Domain.Models;
using Microsoft.AspNetCore.Http;
using NSubstitute.ExceptionExtensions;
using NSubstitute.ReturnsExtensions;

public class GetUnitTests
{
Expand All @@ -33,8 +34,7 @@ public void Get_ReadWhenNoItemAvailable_ReturnsNotFound()
// Arrange
var repositoryMock = Substitute.For<IRepository<ToDoItem>>();
var controller = new ToDoItemsController(repositoryMock);
repositoryMock.ReadAll().Returns(null as IEnumerable<ToDoItem>); // null enumerable
//repositoryMock.ReadAll().Returns([]]); empty enumerable
repositoryMock.ReadAll().ReturnsNull();

// Act
var result = controller.Read();
Expand Down

0 comments on commit e11217b

Please sign in to comment.