Examples of LastFmGroup


Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

      @Override
      protected WebserviceHistoryService getHistoryService() {
        return Mockito.mock(WebserviceHistoryService.class);
      }

    }.getWeeklyArtistChart(new LastFmGroup(lastFmGroup));
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

  }

  @Test
  public void importGroupRelatedDataNotPossibleTwice() {
    Calltype GROUP_ARTISTS = Calltype.GROUP_WEEKLY_ARTIST_CHART;
    LastFmGroup group = new LastFmGroup("Brainwashed");
    WebserviceInvocation groupArtists = new WebserviceInvocation(GROUP_ARTISTS, group);
   
    deleteWebserviceInvocations();
   
    assertTrue(dao.isWebserviceInvocationAllowed(groupArtists));
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

  }

  @Test
  public void differentGroupsDontInterfere() {
    Calltype GROUP_ARTISTS = Calltype.GROUP_WEEKLY_ARTIST_CHART;
    LastFmGroup group1 = new LastFmGroup("Brainwashed");
    LastFmGroup group2 = new LastFmGroup("Dark Ambient");

    WebserviceInvocation groupArtists1 = new WebserviceInvocation(GROUP_ARTISTS, group1);
    WebserviceInvocation groupArtists2 = new WebserviceInvocation(GROUP_ARTISTS, group2);
   
    deleteWebserviceInvocations();
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

  }
 
  @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

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

   
    groups = dao.getLastFmGroups();
    Assert.assertNotNull(groups);
    Assert.assertEquals(0, groups.size());
   
    dao.setLastFmGroups(asList(new LastFmGroup("G1"), new LastFmGroup("G2")));
    groups = dao.getLastFmGroups();
    Assert.assertEquals(2, groups.size());
    Assert.assertEquals("G1", groups.get(0).getName());
    Assert.assertEquals("G2", groups.get(1).getName());
   
    dao.setLastFmGroups(asList(new LastFmGroup("G2"), new LastFmGroup("G3")));
    groups = dao.getLastFmGroups();
    Assert.assertEquals(2, groups.size());
    Assert.assertEquals("G2", groups.get(0).getName());
    Assert.assertEquals("G3", groups.get(1).getName());
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

    dao.getJdbcTemplate().execute("truncate music.lastfmgroup cascade");
    PostgreSQLUtil.loadFunction(dao, UPDATE_LASTFMGROUP);
   
    List<LastFmGroup> groups;
   
    dao.setLastFmGroups(asList(new LastFmGroup("G1"), new LastFmGroup("G2")));
    groups = dao.getLastFmGroups();
    Assert.assertEquals(2, groups.size());
    Assert.assertEquals("G1", groups.get(0).getName());
    Assert.assertEquals("G2", groups.get(1).getName());

    dao.setLastFmGroups(asList(new LastFmGroup("G1")));
    groups = dao.getLastFmGroups();
    Assert.assertEquals(1, groups.size());
    Assert.assertEquals("G1", groups.get(0).getName());

    dao.setLastFmGroups(asList(new LastFmGroup("G1"), new LastFmGroup("G2")));
    groups = dao.getLastFmGroups();
    Assert.assertEquals(2, groups.size());
    Assert.assertEquals("G1", groups.get(0).getName());
    Assert.assertEquals("G2", groups.get(1).getName());
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.LastFmGroup

public class LastFmGroupRowMapper implements RowMapper<LastFmGroup> {

  @Override
  public LastFmGroup mapRow(ResultSet rs, int rowNum) throws SQLException {
    return new LastFmGroup(rs.getString(1));
  }
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.