forked from jwb/facebook-test-java-api
-
Notifications
You must be signed in to change notification settings - Fork 2
Java API for performing tests on Applications integrating with Facebook
License
lucanaldini/facebook-test-java-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Provides a Java API for testing Facebook application integration. Short test example: /** * This is an example code of how to use the * Facebook Test Java API for asserting * that a system integrates with facebook * correctly. */ public void FacebookApplicationSystemTest() { @Test public void a_user_should_have_a_new_wall_post() { // Setup FacebookTestUserAccount account = createAccount(); // Act SystemIntegratingWithFacebook system = testContext.getSystem(); system.registerAccessTokenForUser( account.accessToken ); system.doStuffThatIntegratesWithFacebook(); // Assert String wall = account.getProfileFeed(); // Use your favorite JSON parser/asserter framwork here assertTrue("The post was not found on the wall", wall.contains("System has posted"); } private FacebookTestUserAccount createAccount() { facebookStore = new HttpClientFacebookTestUserStore("<appId>", "<appSecret>")); return facebookStore.createTestUser(true, "read-stream,email"); } } Other examples may be found in the examples directory in the source code or go to the project page: http://code.google.com/p/facebook-test-java-api
About
Java API for performing tests on Applications integrating with Facebook
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Java 100.0%