/facebook-java-api/src/test/java/com/google/code/facebookapi/Issue188TemplateBundleShortStoryTest.java

http://facebook-java-api.googlecode.com/ · Java · 38 lines · 28 code · 9 blank · 1 comment · 0 complexity · e5f3cc39ad61f7f1ca26ce83583973d5 MD5 · raw file

  1. package com.google.code.facebookapi;
  2. import static org.junit.Assert.assertNotNull;
  3. import static org.junit.Assert.assertTrue;
  4. import java.util.ArrayList;
  5. import java.util.List;
  6. import org.junit.Ignore;
  7. import org.junit.Test;
  8. @Ignore
  9. @Deprecated
  10. public class Issue188TemplateBundleShortStoryTest {
  11. @Test
  12. // Remove this line, we want this test to work!
  13. public void testTemplateBundleWithShortStory() throws Exception {
  14. FacebookJaxbRestClient client = FacebookSessionTestUtils.getValidClient( FacebookJaxbRestClient.class );
  15. List<String> oneLineTemplates = new ArrayList<String>();
  16. oneLineTemplates.add( "{*actor*} is advancing through {*appName*}" );
  17. List<BundleStoryTemplate> shortStoryTemplates = new ArrayList<BundleStoryTemplate>();
  18. BundleStoryTemplate shortStory = new BundleStoryTemplate( "{*actor*} is advancing through {*appName*}", "" );
  19. shortStoryTemplates.add( shortStory );
  20. List<BundleActionLink> links = new ArrayList<BundleActionLink>();
  21. BundleActionLink link = new BundleActionLink();
  22. link.setText( "Play {*appName*} Now!" );
  23. link.setHref( "http://apps.facebook.com/mindgames/play.htm" );
  24. links.add( link );
  25. Long templateID = client.feed_registerTemplateBundle( oneLineTemplates, shortStoryTemplates, null, links );
  26. assertNotNull( templateID );
  27. assertTrue( templateID > 0 );
  28. }
  29. }