Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public void GetCoverArtForIdWhenParameterIsNullReturnsStringEmpty()
 {
     _subject.GetCoverArtForId(null).Should().Be(SubsonicService.CoverArtPlaceholder);
 }
Ejemplo n.º 3
0
 public void GetCoverARtForIdWhenParamterIsNotNullAndImageTypeIsOriginalReturnsStringContainigSize()
 {
     _subject.GetCoverArtForId("test", ImageType.Original)
     .Should()
     .Contain(string.Format("&size={0}", (int)ImageType.Original));
 }