Search in sources :

Example 1 with ArtistRecommendation

use of com.github.hakko.musiccabinet.domain.model.aggr.ArtistRecommendation in project musiccabinet by hakko.

the class JdbcArtistRecommendationDaoTest method validateRelatedArtistsInLibrary.

@Test
public void validateRelatedArtistsInLibrary() {
    List<ArtistRecommendation> relatedArtists = artistRecommendationDao.getRelatedArtistsInLibrary(cherId, 10, true);
    Assert.assertNotNull(relatedArtists);
    Assert.assertEquals(2, relatedArtists.size());
    List<Artist> artists = Arrays.asList(new Artist(relatedArtists.get(0).getArtistName()), new Artist(relatedArtists.get(1).getArtistName()));
    Assert.assertTrue(artists.contains(madonna));
    Assert.assertTrue(artists.contains(cyndi));
    Assert.assertFalse(artists.contains(cher));
    Assert.assertFalse(artists.contains(celine));
    Assert.assertFalse(artists.contains(kylie));
}
Also used : Artist(com.github.hakko.musiccabinet.domain.model.music.Artist) ArtistRecommendation(com.github.hakko.musiccabinet.domain.model.aggr.ArtistRecommendation) Test(org.junit.Test)

Aggregations

ArtistRecommendation (com.github.hakko.musiccabinet.domain.model.aggr.ArtistRecommendation)1 Artist (com.github.hakko.musiccabinet.domain.model.music.Artist)1 Test (org.junit.Test)1