コード例 #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);
 }