Examples of Calltype


Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    assertFalse(dao.isWebserviceInvocationAllowed(topArtists2));
  }

  @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();
   
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    assertFalse(dao.isWebserviceInvocationAllowed(groupArtists));
  }

  @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);
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

  public void importTagRelatedDataNotPossibleTwice() {
   
    tagDao.createTags(Arrays.asList("disco"));
    Tag tag = tagDao.getTags().get(0);
   
    Calltype TOP_ARTISTS = Calltype.TAG_GET_TOP_ARTISTS;
    WebserviceInvocation topArtists = new WebserviceInvocation(TOP_ARTISTS, tag);
   
    deleteWebserviceInvocations();
   
    assertTrue(dao.isWebserviceInvocationAllowed(topArtists));
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

  public void tagHistoryAllowanceIsBasedOnId() {
   
    tagDao.createTags(Arrays.asList("disco", "sludge"));
    Tag tag1 = tagDao.getTags().get(0);
    Tag tag2 = tagDao.getTags().get(1);
    Calltype TOP_ARTISTS = Calltype.TAG_GET_TOP_ARTISTS;

    WebserviceInvocation topArtists1 = new WebserviceInvocation(TOP_ARTISTS, tag1);
    WebserviceInvocation topArtists2 = new WebserviceInvocation(TOP_ARTISTS, tag2);
   
    deleteWebserviceInvocations();
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    deleteWebserviceInvocations();

    File file = UnittestLibraryUtil.getFile("Madonna", null, "Jump");
    UnittestLibraryUtil.submitFile(additionDao, file);
   
    final Calltype INFO = ARTIST_GET_INFO, TOP_TRACKS = ARTIST_GET_TOP_TRACKS;
    final String MADONNA = file.getMetadata().getArtist();
    List<String> artistInfo, artistTopTracks;
    artistInfo = dao.getArtistNamesWithNoInvocations(INFO);
    artistTopTracks = dao.getArtistNamesWithNoInvocations(TOP_TRACKS);
   
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    Assert.assertFalse(artistTopTracks.contains(MADONNA));
  }

  @Test
  public void quarantineLogsInvocationTimeInTheFuture() {
    Calltype TOP = Calltype.ARTIST_GET_TOP_TRACKS;
    Artist artist = new Artist("The Notorious B.I.G feat. G. Dep & Missy Elliott");
    WebserviceInvocation wi = new WebserviceInvocation(TOP, artist);
    assertTrue(dao.isWebserviceInvocationAllowed(wi));
    dao.quarantineWebserviceInvocation(wi);
    assertFalse(dao.isWebserviceInvocationAllowed(wi));
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    Assert.assertTrue(date.after(new Date()));
  }

  @Test
  public void blockLogsInvocationTimeInAnInfiniteFuture() {
    Calltype TOP = Calltype.ARTIST_GET_TOP_TRACKS;
    Artist artist = new Artist("Björn Olsson");
    int artistId = musicDao.getArtistId(artist);

    WebserviceInvocation wi = new WebserviceInvocation(TOP, artist);
    assertTrue(dao.isWebserviceInvocationAllowed(wi));

    dao.blockWebserviceInvocation(artistId, TOP);
    assertFalse(dao.isWebserviceInvocationAllowed(wi));

    dao.getJdbcTemplate().queryForObject(
        "select 1 from library.webservice_history"
        + " where artist_id = ? and calltype_id = ? and invocation_time = 'infinity'",
        Integer.class, artistId, TOP.getDatabaseId());
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    Assert.assertFalse(dao.isWebserviceInvocationAllowed(wiSimilar));
  }

  @Test (expected = IllegalArgumentException.class)
  public void artistNullThrowsException() {
    Calltype SIMILAR = Calltype.TRACK_GET_SIMILAR;
    new WebserviceInvocation(SIMILAR, (Artist) null);
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation.Calltype

    new WebserviceInvocation(SIMILAR, (Artist) null);
  }

  @Test (expected = IllegalArgumentException.class)
  public void trackNullThrowsException() {
    Calltype SIMILAR = Calltype.TRACK_GET_SIMILAR;
    new WebserviceInvocation(SIMILAR, (Track) null);
  }
View Full Code Here

Examples of org.jruby.runtime.CallType

        Ruby runtime = context.getRuntime();

        if (args.length == 0 || !(args[0] instanceof RubySymbol)) throw runtime.newArgumentError("no id given");

        Visibility lastVis = context.getLastVisibility();
        CallType lastCallType = context.getLastCallType();

        // create a lightweight thunk
        IRubyObject msg = new RubyNameError.RubyNameErrorMessage(runtime,
                                                                 recv,
                                                                 args[0],
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.