Package com.github.hakko.musiccabinet.domain.model.aggr

Examples of com.github.hakko.musiccabinet.domain.model.aggr.GroupWeeklyArtistChart


    Assert.assertNotNull(service.lastFmDao);
  }
 
  @Test
  public void canInvokeService() throws ApplicationException {
    GroupWeeklyArtistChart artistChart = service.getWeeklyArtistChart(
        new LastFmGroup("group name"));
   
    Assert.assertNotNull(artistChart);
    Assert.assertEquals(0, artistChart.getArtistPlayCounts().size());
  }
View Full Code Here


  @Before
  public void loadFunctionDependency() throws ApplicationException {
    PostgreSQLUtil.loadFunction(dao, UPDATE_GROUP_WEEKLY_ARTIST_CHART);
    PostgreSQLUtil.loadFunction(dao, UPDATE_LASTFMGROUP);

    artistChart = new GroupWeeklyArtistChart(brainwashed.getName(),
        new GroupWeeklyArtistChartParserImpl(new ResourceUtil(
            BRAINWASHED_FILE).getInputStream()).getArtistPlayCount());
    Collections.sort(artistChart.getArtistPlayCounts());

    createArtistMetaData();
View Full Code Here

    dao.createArtistCharts(Arrays.asList(artistChart));
  }

  @Test
  public void validateSingleImport() {
    GroupWeeklyArtistChart daoChart = dao.getWeeklyArtistChart(brainwashed);

    Assert.assertNotNull(daoChart);
    Assert.assertNotNull(daoChart.getArtistPlayCounts());
   
    Assert.assertEquals(artistChart, daoChart);
  }
View Full Code Here

        WSResponse wsResponse = client.getWeeklyArtistChart(group);
        if (wsResponse.wasCallAllowed() && wsResponse.wasCallSuccessful()) {
          StringUtil stringUtil = new StringUtil(wsResponse.getResponseBody());
          GroupWeeklyArtistChartParser parser =
              new GroupWeeklyArtistChartParserImpl(stringUtil.getInputStream());
          artistCharts.add(new GroupWeeklyArtistChart(
              group.getName(), parser.getArtistPlayCount()));
        }
      } catch (ApplicationException e) {
        LOG.warn("Fetching weekly artist chart for " + group.getName() + " failed.", e);
      }
View Full Code Here

        + " inner join music.groupweeklyartistchart gwac on gwac.artist_id = a.id"
        + " inner join music.lastfmgroup g on gwac.lastfmgroup_id = g.id"
        + " where g.group_name = upper(?)"
        + " order by playcount desc, a.artist_name";
   
    return new GroupWeeklyArtistChart(group.getName(), jdbcTemplate.query(
        sql, new Object[]{group.getName()}, new ArtistPlayCountRowMapper()));
  }
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.domain.model.aggr.GroupWeeklyArtistChart

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.