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
50 lines (45 loc) · 2.34 KB
/
GdcTest.java
File metadata and controls
50 lines (45 loc) · 2.34 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Copyright (C) 2004-2017, GoodData(R) Corporation. All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
package com.gooddata.gdc;
import org.testng.annotations.Test;
import static com.gooddata.util.ResourceUtils.readObjectFromResource;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
public class GdcTest {
@SuppressWarnings("deprecation")
@Test
public void deserialize() throws Exception {
final Gdc gdc = readObjectFromResource("/gdc/gdc.json", Gdc.class);
assertThat(gdc, is(notNullValue()));
assertThat(gdc.getHomeLink(), is("/gdc/"));
assertThat(gdc.getHomeUri(), is("/gdc/"));
assertThat(gdc.getTokenLink(), is("/gdc/account/token"));
assertThat(gdc.getTokenUri(), is("/gdc/account/token"));
assertThat(gdc.getLoginLink(), is("/gdc/account/login"));
assertThat(gdc.getLoginUri(), is("/gdc/account/login"));
assertThat(gdc.getMetadataLink(), is("/gdc/md"));
assertThat(gdc.getMetadataUri(), is("/gdc/md"));
assertThat(gdc.getXTabLink(), is("/gdc/xtab2"));
assertThat(gdc.getXTabUri(), is("/gdc/xtab2"));
assertThat(gdc.getAvailableElementsLink(), is("/gdc/availableelements"));
assertThat(gdc.getAvailableElementsUri(), is("/gdc/availableelements"));
assertThat(gdc.getReportExporterLink(), is("/gdc/exporter"));
assertThat(gdc.getReportExporterUri(), is("/gdc/exporter"));
assertThat(gdc.getAccountLink(), is("/gdc/account"));
assertThat(gdc.getAccountUri(), is("/gdc/account"));
assertThat(gdc.getProjectsLink(), is("/gdc/projects"));
assertThat(gdc.getProjectsUri(), is("/gdc/projects"));
assertThat(gdc.getToolLink(), is("/gdc/tool"));
assertThat(gdc.getToolUri(), is("/gdc/tool"));
assertThat(gdc.getTemplatesLink(), is("/gdc/templates"));
assertThat(gdc.getTemplatesUri(), is("/gdc/templates"));
assertThat(gdc.getReleaseInfoLink(), is("/gdc/releaseInfo"));
assertThat(gdc.getReleaseInfoUri(), is("/gdc/releaseInfo"));
assertThat(gdc.getUserStagingLink(), is("/uploads"));
assertThat(gdc.getUserStagingUri(), is("/uploads"));
}
}