public void WhenIMapAlbum_WithValidObject_IGetDto() { Album album = GetAlbum(); AlbumDto dto = _mapper.ToAlbumDto(album); Assert.AreEqual(album.Title, dto.Title); Assert.AreEqual(album.Id, dto.Id); }
public async Task <List <AlbumDto> > GetAlbums() { ICollection <Album> Albums = await _albumApi.GetApiCollection($"{AlbumEndpoint}"); return(Albums.Select(album => _mapper.ToAlbumDto(album)).ToList()); }