public async Task GetAllGroupsAsync_CallsRepositoryCorrectly() { var groups = _fixture.CreateMany <Group>(5).ToList(); _mockRepository.Setup(repo => repo.GetAllGroupsAsync()) .ReturnsAsync(groups); var result = await SUT.GetAllGroupsAsync(); _mockRepository.Verify(repo => repo.GetAllGroupsAsync(), Times.Once); result.ShouldBe(groups); }