Ejemplo n.º 1
0
 @Test
 public void testGetUserProfile() throws FlickrException {
   UrlsInterface iface = flickr.getUrlsInterface();
   String url = iface.getUserProfile(testProperties.getNsid());
   String username = testProperties.getUsername();
   assertEquals(String.format("https://www.flickr.com/people/%s/", username), url);
 }
Ejemplo n.º 2
0
 @Test
 public void testLookupGroup() throws FlickrException {
   UrlsInterface iface = flickr.getUrlsInterface();
   Group group = iface.lookupGroup("https://www.flickr.com/groups/central/");
   assertEquals("FlickrCentral", group.getName());
   assertEquals(testProperties.getGroupId(), group.getId());
 }
Ejemplo n.º 3
0
 @Test
 public void testLookupUser() throws FlickrException {
   UrlsInterface iface = flickr.getUrlsInterface();
   String username = testProperties.getUsername();
   String usernameOnFlickr =
       iface.lookupUser(String.format("https://www.flickr.com/people/%s/", username));
   assertEquals(username, usernameOnFlickr);
 }
Ejemplo n.º 4
0
  @Test
  public void testLookupGallery() throws FlickrException {
    UrlsInterface iface = flickr.getUrlsInterface();

    Gallery gallery =
        iface.lookupGallery(
            String.format(
                "https://www.flickr.com/photos/%s/",
                testProperties.getUsername() + "/galleries/" + testProperties.getGalleryId()));
    assertNotNull(gallery);
    assertTrue(gallery.getId().endsWith(testProperties.getGalleryId()));
  }
Ejemplo n.º 5
0
 @Test
 public void testGetGroup() throws FlickrException {
   UrlsInterface iface = flickr.getUrlsInterface();
   String url = iface.getGroup(testProperties.getGroupId());
   assertEquals("https://www.flickr.com/groups/central/", url);
 }