From 8bad2af97dcf11ee6eacde2d2e1096e1c16c08df Mon Sep 17 00:00:00 2001 From: anhefti Date: Sat, 2 Feb 2019 21:03:54 +0100 Subject: [PATCH] coverage --- pom.xml | 4 ++-- .../integration/api/admin/InstitutionAPITest.java | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e7632a4f..557e373d 100644 --- a/pom.xml +++ b/pom.xml @@ -153,8 +153,8 @@ ch/ethz/seb/sebserver/* - ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper - ch/ethz/seb/sebserver/webservice/datalayer/batis/model + ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/* + ch/ethz/seb/sebserver/webservice/datalayer/batis/model/* diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/InstitutionAPITest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/InstitutionAPITest.java index 64b7aa4a..3abe84f9 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/InstitutionAPITest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/InstitutionAPITest.java @@ -92,6 +92,17 @@ public class InstitutionAPITest extends AdministrationAPIIntegrationTester { assertNotNull(errorMessage); assertTrue(errorMessage.size() > 0); assertEquals("1001", errorMessage.get(0).messageCode); + + // get own institution + final Institution own = new RestAPITestHelper() + .withAccessToken(getAdminInstitution1Access()) + .withPath(SEBServerRestEndpoints.ENDPOINT_INSTITUTION + "/self") + .withExpectedStatus(HttpStatus.OK) + .getAsObject(new TypeReference() { + }); + + assertNotNull(own); + assertTrue(own.id.longValue() == 1); } @Test