예제 #1
0
        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);
        }
예제 #2
0
        public async Task <List <AlbumDto> > GetAlbums()
        {
            ICollection <Album> Albums = await _albumApi.GetApiCollection($"{AlbumEndpoint}");

            return(Albums.Select(album => _mapper.ToAlbumDto(album)).ToList());
        }