public void GetByUserId_NoUserData_ReturnsEmptyList() { _mockPhotoRepository.GetAll().Returns(new List <PhotoDto>()); _mockAlbumRepository.GetAll().Returns(new List <AlbumDto>()); var result = _service.GetByUserId(1); Assert.IsNotNull(result); Assert.AreEqual(0, result.Count()); _mockPhotoRepository.Received(1).GetAll(Arg.Any <Expression <Func <PhotoDto, bool> > >()); _mockAlbumRepository.Received(1).GetAll(Arg.Any <Expression <Func <AlbumDto, bool> > >()); }
public IEnumerable <PhotoAlbum> Get(int userId) { return(_photoAlbumService.GetByUserId(userId)); }