Examples of ArtistInfo


Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    cherId = musicDao.getArtistId(cher);

    List<ArtistInfo> artistInfos = new ArrayList<>();
    for (Artist artist : Arrays.asList(madonna, cyndi, celine, kylie)) {
      artistInfos.add(new ArtistInfo(artist, "/image/for/" + artist.getName()));
    }
    artistInfoDao.createArtistInfo(artistInfos);
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    List<File> files = new ArrayList<>();
    for (Period period : Period.values()) {
      String fileName = format(TOP_ARTISTS_FILE, period.getDescription());
      for (Artist artist : new UserTopArtistsParserImpl(
          new ResourceUtil(fileName, UTF8).getInputStream()).getArtists()) {
        artistInfos.put(artist, new ArtistInfo(artist));
        files.add(UnittestLibraryUtil.getFile(artist.getName(), "A", "T"));
      }
    }
    artistInfoDao.createArtistInfo(new ArrayList<ArtistInfo>(artistInfos.values()));
    submitFile(additionDao, files);
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    for (Artist artist : artists) {
      files.add(getFile(artist.getName(), null, null));
    }
    List<ArtistInfo> artistInfos = new ArrayList<>();
    for (Artist artist : artists) {
      artistInfos.add(new ArtistInfo(artist, "/url/to/" + artist.getName()));
    }

    additionDao.getJdbcTemplate().execute("truncate library.file cascade");
    UnittestLibraryUtil.submitFile(additionDao, files);
    artistInfoDao.createArtistInfo(artistInfos);
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

  @Test
  public void canInvokeService() throws ApplicationException {
    String artistName = "A Previously Unknown Artist";
    int artistId = musicDao.getArtistId(artistName);
   
    ArtistInfo artistInfo = aiService.getArtistInfo(artistId);
   
    Assert.assertNotNull(artistInfo);
    Assert.assertEquals(artistName, artistInfo.getArtist().getName());
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    lastFmDao.createOrUpdateLastFmUser(user1);

    user2 = new LastFmUser(userName2);
    lastFmDao.createOrUpdateLastFmUser(user2);

    artistInfoDao.createArtistInfo(asList(new ArtistInfo(new Artist(artistName1), "img")));
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    for (Artist artist : artists) {
      files.add(getFile(artist.getName(), null, null));
    }
    List<ArtistInfo> artistInfos = new ArrayList<>();
    for (Artist artist : artists) {
      artistInfos.add(new ArtistInfo(artist, "/url/to/" + artist.getName()));
    }

    additionDao.getJdbcTemplate().execute("truncate library.directory cascade");
    UnittestLibraryUtil.submitFile(additionDao, files);
    artistInfoDao.createArtistInfo(artistInfos);
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    for (Artist artist : artists) {
      files.add(getFile(artist.getName(), null, null));
    }
    List<ArtistInfo> artistInfos = new ArrayList<>();
    for (Artist artist : artists) {
      artistInfos.add(new ArtistInfo(artist, "/url/to/" + artist.getName()));
    }

    additionDao.getJdbcTemplate().execute("truncate library.directory cascade");
    additionDao.getJdbcTemplate().execute("truncate library.artist cascade");
    additionDao.getJdbcTemplate().execute("truncate music.groupweeklyartistchart cascade");
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    artistInfos.add(aiAbba);
    artistInfos.add(aiCher);
   
    dao.createArtistInfo(artistInfos);
   
    ArtistInfo dbAbba = dao.getArtistInfo(aiAbba.getArtist());
    ArtistInfo dbCher = dao.getArtistInfo(aiCher.getArtist());
   
    Assert.assertEquals(aiAbba, dbAbba);
    Assert.assertEquals(aiCher, dbCher);
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

    aiAbba.setBioSummary(newBio);
    aiAbba.setBioContent(newContent);
   
    dao.createArtistInfo(Arrays.asList(aiAbba, aiCher));
   
    ArtistInfo dbAbba = dao.getArtistInfo(aiAbba.getArtist());
   
    Assert.assertEquals(newBio, dbAbba.getBioSummary());
    Assert.assertEquals(newContent, dbAbba.getBioContent());
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.ArtistInfo

  }

  @Test
  public void unknownArtistInfoReturnsNull() throws ApplicationException {
    int unknownId = -1;
    ArtistInfo artistInfo = dao.getArtistInfo(unknownId);

    assertNull(artistInfo);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.