Skip to content

Commit d709be5

Browse files
committed
Updated tests using the old match info web-services (#757)
Change-Id: Ic02bd5137860b592e15617ac61bd70a65e4cd3cd
1 parent 205dc5b commit d709be5

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Changes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
- Added tests for the DNB scenario with custom max match
44
and context size. (#745)
5-
- Clean up named-vc.
5+
- Cleaned up named-vc.
6+
- Updated tests using the old match info web-services (#757)
67

78
# version 0.73.1
89

src/test/java/de/ids_mannheim/korap/web/controller/MatchInfoControllerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class MatchInfoControllerTest extends SpringJerseyTest {
2323
public void testGetMatchInfoPublicCorpus () throws KustvaktException {
2424
Response response = target().path(API_VERSION).path("corpus")
2525
.path("GOE").path("AGA").path("01784").path("p36-100")
26-
.path("matchInfo").queryParam("foundry", "*").request().get();
26+
.queryParam("foundry", "*").request().get();
2727
assertEquals(Status.OK.getStatusCode(), response.getStatus());
2828
String entity = response.readEntity(String.class);
2929
JsonNode node = JsonUtils.readTree(entity);
@@ -41,7 +41,7 @@ public void testGetMatchInfoPublicCorpus () throws KustvaktException {
4141
public void testGetMatchInfoNotAllowed () throws KustvaktException {
4242
Response response = target().path(API_VERSION).path("corpus")
4343
.path("GOE").path("AGI").path("04846").path("p36875-36876")
44-
.path("matchInfo").queryParam("foundry", "*").request().get();
44+
.queryParam("foundry", "*").request().get();
4545
assertEquals(Status.UNAUTHORIZED.getStatusCode(), response.getStatus());
4646
String entity = response.readEntity(String.class);
4747
JsonNode node = JsonUtils.readTree(entity);
@@ -58,7 +58,7 @@ public void testGetMatchInfoNotAllowed () throws KustvaktException {
5858
public void testGetMatchInfoWithAuthentication () throws KustvaktException {
5959
Response response = target().path(API_VERSION).path("corpus")
6060
.path("GOE").path("AGI").path("04846").path("p36875-36876")
61-
.path("matchInfo").queryParam("foundry", "*").request()
61+
.queryParam("foundry", "*").request()
6262
.header(Attributes.AUTHORIZATION,
6363
HttpAuthorizationHandler
6464
.createBasicAuthorizationHeaderValue("kustvakt",

src/test/java/de/ids_mannheim/korap/web/lite/LiteSearchControllerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void testParameterField () throws KustvaktException {
171171
@Test
172172
public void testMatchInfoGetWithoutSpans () throws KustvaktException {
173173
Response response = target().path(API_VERSION)
174-
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42/matchInfo")
174+
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42")
175175
.queryParam("foundry", "*").queryParam("spans", "false")
176176
.request().get();
177177
assertEquals(Status.OK.getStatusCode(), response.getStatus());
@@ -187,7 +187,7 @@ public void testMatchInfoGetWithoutSpans () throws KustvaktException {
187187
@Test
188188
public void testMatchInfoGetWithoutHighlights () throws KustvaktException {
189189
Response response = target().path(API_VERSION)
190-
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42/matchInfo")
190+
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42")
191191
.queryParam("foundry", "xy").queryParam("spans", "false")
192192
.request().get();
193193
assertEquals(Status.OK.getStatusCode(), response.getStatus());
@@ -223,7 +223,7 @@ public void testMatchInfoWithoutExtension () throws KustvaktException {
223223
@Test
224224
public void testMatchInfoGetWithHighlights () throws KustvaktException {
225225
Response response = target().path(API_VERSION)
226-
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42/matchInfo")
226+
.path("corpus/GOE/AGA/01784/p36-46(5)37-45(2)38-42")
227227
.queryParam("foundry", "xy").queryParam("spans", "false")
228228
.queryParam("hls", "true").request().get();
229229
assertEquals(Status.OK.getStatusCode(), response.getStatus());
@@ -249,7 +249,7 @@ public void testMatchInfoGetWithHighlights () throws KustvaktException {
249249
@Test
250250
public void testMatchInfoGet2 () throws KustvaktException {
251251
Response response = target().path(API_VERSION)
252-
.path("corpus/GOE/AGA/01784/p36-46/matchInfo")
252+
.path("corpus/GOE/AGA/01784/p36-46")
253253
.queryParam("foundry", "*").request().get();
254254
assertEquals(Status.OK.getStatusCode(), response.getStatus());
255255
String ent = response.readEntity(String.class);

0 commit comments

Comments
 (0)