Package fm.last.musicbrainz.data.model

Examples of fm.last.musicbrainz.data.model.Artist


    assertThat(track.getName(), is("The Saint"));
  }

  @Test
  public void getByArtistAndNameReturnsOneTrack() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    String trackName = "The Saint";
    List<Track> tracks = dao.getByArtistAndName(artist, trackName);
    assertThat(tracks, hasSize(2));
    for (Track track : tracks) {
      assertThat(track.getName(), is(trackName));
View Full Code Here


    }
  }

  @Test
  public void getByArtistAndUppercaseNameReturnsOneTrack() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    String trackName = "THE SAINT";
    List<Track> tracks = dao.getByArtistAndName(artist, trackName);
    assertThat(tracks, hasSize(2));
  }
View Full Code Here

    assertThat(tracks, hasSize(2));
  }

  @Test
  public void getByArtistAndLowercaseNameReturnsOneTrack() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    String trackName = "the saint";
    List<Track> tracks = dao.getByArtistAndName(artist, trackName);
    assertThat(tracks, hasSize(2));
  }
View Full Code Here

    assertThat(tracks, hasSize(2));
  }

  @Test
  public void getByArtistAndNotExistingNameReturnsEmptyList() {
    Artist artist = (Artist) session.load(Artist.class, 4);
    List<Track> tracks = dao.getByArtistAndName(artist, "does not exists");
    assertThat(tracks, hasSize(0));
  }
View Full Code Here

    assertThat(tracks, hasSize(0));
  }

  @Test
  public void getByExistingArtistReturnsThreeTracks() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    List<Track> tracks = dao.getByArtist(artist);
    Set<Integer> expectedTrackIds = Sets.newHashSet(1, 2, 3);
    Set<Integer> actualTrackIds = Sets.newHashSet();
    for (Track track : tracks) {
      actualTrackIds.add(track.getId());
View Full Code Here

    assertThat(actualTrackIds, is(expectedTrackIds));
  }

  @Test
  public void getByArtistThatHasNoTracksReturnsEmptyList() {
    Artist artist = (Artist) session.load(Artist.class, 1);
    List<Track> tracks = dao.getByArtist(artist);
    assertThat(tracks, hasSize(0));
  }
View Full Code Here

  @Test
  public void getByExistingArtistReturnsThreeReleases() {
    Set<String> expectedReleaseNames = Sets.newHashSet("The Warning", "One Life Stand", "Multi-Disc Extravaganza");
    Set<String> actualReleaseNames = Sets.newHashSet();
    Artist artist = (Artist) session.load(Artist.class, 4);
    for (Release release : dao.getByArtist(artist)) {
      actualReleaseNames.add(release.getName());
    }
    assertThat(actualReleaseNames, is(expectedReleaseNames));
  }
View Full Code Here

    assertThat(actualReleaseNames, is(expectedReleaseNames));
  }

  @Test
  public void getByArtistThatHasNoReleasesReturnsEmptyList() {
    Artist artist = (Artist) session.load(Artist.class, 1);
    List<Release> releases = dao.getByArtist(artist);
    assertThat(releases, hasSize(0));
  }
View Full Code Here

    assertThat(releases, hasSize(0));
  }

  @Test
  public void getByArtistAndNameReturnsTwoReleases() {
    Artist artist = (Artist) session.load(Artist.class, 4);
    String releaseName = "The Warning";
    List<Release> releases = dao.getByArtistAndName(artist, releaseName);
    assertThat(releases, hasSize(2));
    for (Release release : releases) {
      assertThat(release.getName(), is(releaseName));
View Full Code Here

    }
  }

  @Test
  public void getByArtistAndUppercaseNameReturnsTwoReleases() {
    Artist artist = (Artist) session.load(Artist.class, 4);
    List<Release> releases = dao.getByArtistAndName(artist, "THE WARNING");
    assertThat(releases, hasSize(2));
  }
View Full Code Here

TOP

Related Classes of fm.last.musicbrainz.data.model.Artist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.