forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGdcTest.java
More file actions
34 lines (28 loc) · 1.37 KB
/
Copy pathGdcTest.java
File metadata and controls
34 lines (28 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.gooddata.gdc;
import org.codehaus.jackson.map.ObjectMapper;
import org.junit.Test;
import java.io.InputStream;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
public class GdcTest {
@Test
public void deserialize() throws Exception {
final InputStream stream = getClass().getResourceAsStream("/gdc/gdc.json");
final Gdc gdc = new ObjectMapper().readValue(stream, Gdc.class);
assertThat(gdc, is(notNullValue()));
assertThat(gdc.getHomeLink(), is("/gdc/"));
assertThat(gdc.getTokenLink(), is("/gdc/account/token"));
assertThat(gdc.getLoginLink(), is("/gdc/account/login"));
assertThat(gdc.getMetadataLink(), is("/gdc/md"));
assertThat(gdc.getXTabLink(), is("/gdc/xtab2"));
assertThat(gdc.getAvailableElementsLink(), is("/gdc/availableelements"));
assertThat(gdc.getReportExporterLink(), is("/gdc/exporter"));
assertThat(gdc.getAccountLink(), is("/gdc/account"));
assertThat(gdc.getProjectsLink(), is("/gdc/projects"));
assertThat(gdc.getToolLink(), is("/gdc/tool"));
assertThat(gdc.getTemplatesLink(), is("/gdc/templates"));
assertThat(gdc.getReleaseInfoLink(), is("/gdc/releaseInfo"));
assertThat(gdc.getUserStagingLink(), is("https://STAGING"));
}
}