Package com.restfb.types

Examples of com.restfb.types.Account


   * test reading in the sample account from <a
   * href="https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens">here</a>
   */
  @Test
  public void accountTest() {
    Account account = createJsonMapper().toJavaObject(jsonFromClasspath("account"), Account.class);
    assertEquals("Product/service", account.getCategory());
    assertEquals("{access-token}", account.getAccessToken());
    assertEquals("1234567890", account.getId());
    assertEquals("Sample Page", account.getName());
    assertEquals(6, account.getPerms().size());
    assertTrue(account.getPerms().contains("ADMINISTER"));
    assertTrue(account.getPerms().contains("EDIT_PROFILE"));
    assertTrue(account.getPerms().contains("CREATE_CONTENT"));
    assertTrue(account.getPerms().contains("MODERATE_CONTENT"));
    assertTrue(account.getPerms().contains("CREATE_ADS"));
    assertTrue(account.getPerms().contains("BASIC_ADMIN"));
  }
View Full Code Here

TOP

Related Classes of com.restfb.types.Account

Copyright © 2018 www.massapicom. 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.