예제 #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);
 }
예제 #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());
 }
예제 #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);
 }
예제 #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()));
  }
예제 #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);
 }