PageRenderTime 37ms CodeModel.GetById 29ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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