Michael Hanl | e56bb89 | 2016-05-25 17:34:41 +0200 | [diff] [blame] | 1 | import de.ids_mannheim.korap.config.QueryBuilderUtil; |
| 2 | import de.ids_mannheim.korap.query.serialize.MetaQueryBuilder; |
| 3 | import org.junit.Assert; |
| 4 | import org.junit.Test; |
| 5 | |
| 6 | import java.util.Map; |
| 7 | |
| 8 | import static org.junit.Assert.assertEquals; |
| 9 | |
| 10 | /** |
| 11 | * Created by hanl on 17.04.16. |
| 12 | */ |
| 13 | public class MetaQueryBuilderTest { |
| 14 | |
| 15 | |
| 16 | |
| 17 | @Test |
| 18 | public void testSpanContext () { |
| 19 | System.out.println("____________________-"); |
| 20 | MetaQueryBuilder m = QueryBuilderUtil.defaultMetaBuilder(0, 1, 5, |
| 21 | "sentence", false); |
| 22 | Map map = m.raw(); |
| 23 | |
| 24 | assertEquals("sentence", map.get("context")); |
| 25 | assertEquals(1, map.get("startPage")); |
| 26 | assertEquals(0, map.get("startIndex")); |
| 27 | assertEquals(false, map.get("cufOff")); |
| 28 | |
| 29 | } |
| 30 | } |