Package com.google.code.facebookapi

Source Code of com.google.code.facebookapi.Issue176UserStandardInfoTest

package com.google.code.facebookapi;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.junit.Test;

import com.google.code.facebookapi.schema.User;
import com.google.code.facebookapi.schema.UsersGetStandardInfoResponse;

public class Issue176UserStandardInfoTest {

  @Test
  public void testGetStandardInfo() throws Exception {
    FacebookJaxbRestClient client = FacebookSessionTestUtils.getValidClient( FacebookJaxbRestClient.class );

    List<Long> userIds = Collections.singletonList( client.users_getLoggedInUser() );
    List<ProfileField> profileFields = new ArrayList<ProfileField>();

    profileFields.add( ProfileField.NAME );

    UsersGetStandardInfoResponse response = client.users_getStandardInfo( userIds, profileFields );

    User user = response.getUser().get( 0 );

    assertNotNull( user.getName() );
    assertNotSame( "", user.getName().trim() );
  }

}
TOP

Related Classes of com.google.code.facebookapi.Issue176UserStandardInfoTest

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.