blob: dc0ca87afe6b0767112e8d146b6891a62cd55b45 [file] [log] [blame]
Michael Hanle56bb892016-05-25 17:34:41 +02001import com.sun.jersey.api.client.ClientResponse;
2import com.sun.jersey.test.framework.JerseyTest;
3import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
4import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
5import de.ids_mannheim.korap.config.BeansFactory;
6import org.junit.AfterClass;
7import org.junit.BeforeClass;
8import org.junit.Test;
9
10/**
11 * @author hanl
12 * @date 29/07/2015
13 */
14@Deprecated
15public class JerseyTest1 extends JerseyTest {
16
17 public JerseyTest1 () {
18 super("de.ids_mannheim.korap.web.service",
19 "de.ids_mannheim.korap.web.utils");
20 }
21
22
23 @BeforeClass
24 public static void setup () {
25 BeansFactory.loadClasspathContext();
26 }
27
28
29 @AfterClass
30 public static void close () {
31 BeansFactory.closeApplication();
32 }
33
34
35 @Override
36 protected TestContainerFactory getTestContainerFactory () {
37 return new GrizzlyWebTestContainerFactory();
38 }
39
40
41 @Test
42 public void testFieldsInSearch () {
43 ClientResponse response = resource().path("v0.1/search")
44 .queryParam("q", "[base=Wort]").queryParam("ql", "poliqarp")
45 .get(ClientResponse.class);
46 System.out.println("response " + response);
47 }
48}