blob: 71ca546b688d3a4ffa5f5e1c3f821a57565801f2 [file] [log] [blame]
Michael Hanl55191d92013-12-05 11:53:10 +00001import de.ids_mannheim.korap.query.serialize.MetaCollectionSerializer;
2import de.ids_mannheim.korap.query.serialize.MetaQuerySerializer;
3import org.junit.Test;
4import org.junit.runner.RunWith;
5import org.junit.runners.JUnit4;
6
7import java.io.IOException;
8import java.util.HashMap;
9import java.util.Map;
10
11/**
12 * @author hanl
13 * @date 04/12/2013
14 */
15
16@RunWith(JUnit4.class)
17public class MetaQuerySerializationTest {
18
19 private MetaQuerySerializer serializer;
20
21 public MetaQuerySerializationTest() {
22 serializer = new MetaQuerySerializer();
23 }
24
25 @Test
26 public void test() throws IOException {
27 Map<String, String> j = new HashMap();
28 j.put("author", "Goethe");
29 j.put("pubPLace", "Erfurt");
30 j.put("textClass", "wissenschaft");
31 String s = serializer.stringify(j);
32// System.out.println("value reference " + s);
33 }
34
35 @Test
36 public void testSingle() throws IOException {
37 Map<String, String> j = new HashMap();
38 j.put("textClass", "wissenschaft");
39 String s = serializer.stringify(j);
40// System.out.println("value reference test single " + s);
41 }
42
43 @Test
44 public void testResourceMeta() throws IOException {
45 MetaCollectionSerializer ser = new MetaCollectionSerializer();
46 String s = ser.serialize("25");
47 System.out.println(" --- RESULT JSON " + s);
48
49
50 }
51}