public async Task GetAllAsync_ShouldReturnPagedListOfAllExercisesDto_WhenParametersAreNull(int count) { // Arrange var exercises = _fixture.Build <Exercise>() .CreateMany(count: count); var paginationQuery = new PaginationQuery(); var page = new PagedList <Exercise>(exercises.ToList(), exercises.ToList().Count(), 1, 10); _exerciseRepository.GetAllAsync(Arg.Any <string>(), Arg.Any <string>(), paginationQuery).Returns(page); // Act var dto = await _sut.GetAllAsync(null, null, paginationQuery); // Assert dto.ShouldNotBeNull(); dto.ShouldBeOfType(typeof(PageResultDto <ExerciseDto>)); dto.Items.Count.ShouldBe(exercises.ToList().Count); }