1 package it.com.atlassian.rest.expand;
2
3 import com.atlassian.plugins.rest.expand.Expand;
4 import com.atlassian.rest.jersey.client.WebResourceFactory;
5 import com.google.common.collect.Lists;
6 import com.sun.jersey.api.client.WebResource;
7 import org.junit.Before;
8 import org.junit.Test;
9
10 import static junit.framework.Assert.assertTrue;
11
12
13
14
15 public class ExpandTest
16 {
17 private WebResource webResource;
18
19 @Before
20 public void setUp()
21 {
22 webResource = WebResourceFactory.authenticated();
23 }
24
25 @Test
26 public void selfExpandingFieldGetsExpanded()
27 {
28 Expand expand = webResource.path("expand").queryParam("expand", "selfExpanding").get(Expand.class);
29
30 assertTrue(Lists.<Object>newArrayList(Expand.SELF_EXPANDING_STRINGS).equals(expand.getSelfExpanding()));
31 }
32 }