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));
}
Aggregations