forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestrictionTest.java
More file actions
37 lines (31 loc) · 1.16 KB
/
Copy pathRestrictionTest.java
File metadata and controls
37 lines (31 loc) · 1.16 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
/*
* Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
public class RestrictionTest {
@Test
public void testIdentifier() throws Exception {
final Restriction id = Restriction.identifier("my id");
assertThat(id, is(notNullValue()));
assertThat(id.getType(), is(Restriction.Type.IDENTIFIER));
assertThat(id.getValue(), is("my id"));
}
@Test
public void testTitle() throws Exception {
final Restriction id = Restriction.title("my title");
assertThat(id, is(notNullValue()));
assertThat(id.getType(), is(Restriction.Type.TITLE));
assertThat(id.getValue(), is("my title"));
}
@Test
public void testSummary() throws Exception {
final Restriction id = Restriction.summary("my summary");
assertThat(id, is(notNullValue()));
assertThat(id.getType(), is(Restriction.Type.SUMMARY));
assertThat(id.getValue(), is("my summary"));
}
}