Ejemplo n.º 1
0
  @Test
  public void testGetClusterPhotos() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    PhotoList<Photo> photos = iface.getClusterPhotos("ducati", "999-1098-848");
    assertEquals(23, photos.getTotal());
  }
Ejemplo n.º 2
0
  @Test
  public void testGetListUserRaw() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    Collection<TagRaw> tags = iface.getListUserRaw();
    assertNotNull(tags);
    assertFalse(tags.isEmpty());
  }
Ejemplo n.º 3
0
  @Test
  public void testGetHotList() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    Collection<HotlistTag> tags = iface.getHotList("day", 20);
    assertNotNull(tags);
    assertTrue(tags.size() > 1);
  }
Ejemplo n.º 4
0
  @Test
  public void testGetRelated() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    RelatedTagsList relatedTags = iface.getRelated("flower");
    assertNotNull(relatedTags);
    assertEquals("flower", relatedTags.getSource());
    assertTrue("Number of related tags returned was 0", relatedTags.size() > 0);
  }
Ejemplo n.º 5
0
  @Test
  public void testGetListPhoto() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    Photo photo = iface.getListPhoto(testProperties.getPhotoId());
    assertNotNull(photo);
    assertEquals(testProperties.getPhotoId(), photo.getId());
    assertNotNull(photo.getTags());
    assertFalse(photo.getTags().isEmpty());
  }
Ejemplo n.º 6
0
  @Test
  public void testListUserPopular() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    Collection<Tag> tags = iface.getListUserPopular(testProperties.getNsid());
    assertNotNull(tags);
    assertEquals(10, tags.size());
    for (Tag tag : tags) {
      assertNotNull(tag.getValue());
    }
  }
Ejemplo n.º 7
0
  @Test
  public void testGetClusters() throws FlickrException {

    TagsInterface iface = flickr.getTagsInterface();
    ClusterList clusters = iface.getClusters("api");
    // System.out.println("size " + clusters.getClusters().get(2).getTags().size());
    assertTrue(clusters.getClusters().size() >= 3);
    Cluster cluster = clusters.getClusters().get(0);
    assertTrue(cluster.getTags().size() >= 1);
    cluster = clusters.getClusters().get(1);
    assertTrue(cluster.getTags().size() >= 1);
    cluster = clusters.getClusters().get(2);
    assertTrue(cluster.getTags().size() >= 1);
  }