public async Task get_single_async_should_not_invoke_set_repository_get_single_async_by_id_when_set_does_not_exist() { var setService = new SetService(_setRepositoryMock.Object, _mapperMock.Object); var book = new Book("Lśnienie", "opis", "image.png", "Stephen King", "Prószyński i S-ka", 20); var set = new Set(book, true); await setService.GetSingleAsync(set.Id); _setRepositoryMock.Setup(x => x.GetSingleAsync(set.Id)) .ReturnsAsync(() => null); _setRepositoryMock.Verify(x => x.GetSingleAsync(It.IsAny <Guid>()), Times.Once); }