public async Task AddPhotoForBook_WhenCalled_PhotoIsAddedIntoRepository() { var mockFile = new FormFile(new MemoryStream(Encoding.UTF8.GetBytes("Mock file")), 0, 0, "Data", "mock.txt"); var photoForCreationDto = new PhotoForCreationDto { Description = "description", File = mockFile }; await _controller.AddPhotoForBook(_book.Id, photoForCreationDto); _repo.Verify(r => r.SaveAll()); }