public void PopulateMenuItems(SearchResultCollection result) { MenuItemViewModels.Clear(); if (result == null) { return; } PopulateArtists(result.Artists); PopulateAlbums(result.Albums); PopulateSongs(result.Songs); foreach (var subsonicModel in _menuItemViewModels.Select(x => x.Item)) { subsonicModel.CoverArt = SubsonicService.GetCoverArtForId(subsonicModel.CoverArt); } }
public void GetCoverArtForIdWhenParameterIsNullReturnsStringEmpty() { _subject.GetCoverArtForId(null).Should().Be(SubsonicService.CoverArtPlaceholder); }
public void GetCoverARtForIdWhenParamterIsNotNullAndImageTypeIsOriginalReturnsStringContainigSize() { _subject.GetCoverArtForId("test", ImageType.Original) .Should() .Contain(string.Format("&size={0}", (int)ImageType.Original)); }