File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/test/java/com/arangodb/example/document Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2424import static org .hamcrest .Matchers .notNullValue ;
2525import static org .junit .Assert .assertThat ;
2626
27+ import java .util .Map ;
28+
2729import org .json .simple .parser .ParseException ;
2830import org .junit .BeforeClass ;
2931import org .junit .Test ;
@@ -64,6 +66,15 @@ public void getAsBaseDocument() {
6466 assertThat (String .valueOf (doc .getAttribute ("foo" )), is ("bar" ));
6567 }
6668
69+ @ SuppressWarnings ("unchecked" )
70+ @ Test
71+ public void getAsMap () {
72+ final Map <String , Object > doc = collection .getDocument (key , Map .class );
73+ assertThat (doc , is (notNullValue ()));
74+ assertThat (doc .get ("foo" ), is (notNullValue ()));
75+ assertThat (String .valueOf (doc .get ("foo" )), is ("bar" ));
76+ }
77+
6778 @ Test
6879 public void getAsVPack () {
6980 final VPackSlice doc = collection .getDocument (key , VPackSlice .class );
You can’t perform that action at this time.
0 commit comments