forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryTest.java
More file actions
23 lines (19 loc) · 832 Bytes
/
Copy pathQueryTest.java
File metadata and controls
23 lines (19 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
* Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import org.codehaus.jackson.map.ObjectMapper;
import org.testng.annotations.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
public class QueryTest {
@Test
public void testDeserialization() throws Exception {
final Query query = new ObjectMapper().readValue(getClass().getResourceAsStream("/md/query.json"), Query.class);
assertThat(query, is(notNullValue()));
assertThat(query.getCategory(), is("MD::Query::Object"));
assertThat(query.getTitle(), is("List of allTypes"));
assertThat(query.getSummary(), is("Metadata Query Resources for project 'PROJ_ID'"));
}
}