Package fm.last.musicbrainz.data.model

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


    assertThat(releases, hasSize(2));
  }

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


    assertThat(releases, hasSize(2));
  }

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

    assertThat(recording.getName(), is("The Sinner"));
  }

  @Test
  public void getByArtistAndNameReturnsTwoRecordings() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    String trackName = "Never Gonna Give You Up";
    List<Recording> recordings = dao.getByArtistAndName(artist, trackName);
    assertThat(recordings, hasSize(2));
    for (Recording recording : recordings) {
      assertThat(recording.getName(), is(trackName));
View Full Code Here

    }
  }

  @Test
  public void getByArtistAndUppercaseNameReturnsTwoRecordings() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    List<Recording> recordings = dao.getByArtistAndName(artist, "NEVER GONNA GIVE YOU UP");
    assertThat(recordings, hasSize(2));
  }
View Full Code Here

    assertThat(recordings, hasSize(2));
  }

  @Test
  public void getByArtistAndLowercaseNameReturnsTwoRecordings() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    List<Recording> recordings = dao.getByArtistAndName(artist, "never gonna give you up");
    assertThat(recordings, hasSize(2));
  }
View Full Code Here

    assertThat(recordings, hasSize(2));
  }

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

    assertThat(recordings, hasSize(0));
  }

  @Test
  public void getByArtistReturnsAllRecordings() {
    Artist artist = (Artist) session.load(Artist.class, 5);
    List<Recording> recordings = dao.getByArtist(artist);
    assertThat(recordings, hasSize(4));
  }
View Full Code Here

    assertThat(recordings, hasSize(4));
  }

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

  @Autowired
  private ArtistDao dao;

  @Test
  public void getByExistingIdReturnsOneArtist() {
    Artist artist = dao.getById(1);
    assertThat(artist.getName(), is("Q and Not U"));
  }
View Full Code Here

    assertThat(artist.getName(), is("Q and Not U"));
  }

  @Test
  public void getByNotExistingIdReturnsNull() {
    Artist artist = dao.getById(9001);
    assertThat(artist, is(nullValue()));
  }
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.