Fix test cases after renaming the context resource.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@179402 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2019-05-14 03:19:03 +00:00
parent 1fbb37defa
commit c5f90ae282
2 changed files with 8 additions and 10 deletions

View File

@ -125,12 +125,11 @@ public class GXRestTest extends JerseyTest {
} else { } else {
assertEquals("Unexpected returned code. Reason: " + response.getHTTPCode(), assertEquals("Unexpected returned code. Reason: " + response.getHTTPCode(),
Status.BAD_REQUEST.getStatusCode(), delete.getStatus()); Status.UNAUTHORIZED.getStatusCode(), delete.getStatus());
if (response.hasException()) { if (response.hasException()) {
try { try {
response.getException().printStackTrace(); response.getException().printStackTrace();
} catch (Exception e) { } catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
throw e; throw e;
} }

View File

@ -25,9 +25,8 @@ import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient; import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClientImpl; import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClientImpl;
import org.gcube.informationsystem.utils.ISMapper; import org.gcube.informationsystem.utils.ISMapper;
import org.gcube.resourcemanagement.manager.io.rs.RMCreateContextCode;
import org.gcube.resourcemanagement.manager.io.rs.RMContextsAccess; import org.gcube.resourcemanagement.manager.io.rs.RMContextsAccess;
import org.gcube.resourcemanagement.manager.webapp.rs.RMContext; import org.gcube.resourcemanagement.manager.io.rs.RMCreateContextCode;
import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.JerseyTest;
import org.junit.AfterClass; import org.junit.AfterClass;
@ -121,7 +120,7 @@ public class RMContextTest extends JerseyTest {
@Override @Override
protected Application configure() { protected Application configure() {
return new ResourceConfig(RMContext.class); return new ResourceConfig(RMContextsAccess.class);
} }
/** /**
@ -145,7 +144,7 @@ public class RMContextTest extends JerseyTest {
/** /**
* Test method for * Test method for
* {@link RMContext#create(String, String)}. * {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContext#create(String, String)}.
* *
* @throws Exception * @throws Exception
*/ */
@ -190,7 +189,7 @@ public class RMContextTest extends JerseyTest {
/** /**
* Test method for * Test method for
* {@link RMContext#create(String, String)} * {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContext#create(String, String)}
* when the parent does not exist. * when the parent does not exist.
*/ */
@Test @Test
@ -219,7 +218,7 @@ public class RMContextTest extends JerseyTest {
/** /**
* Test method for * Test method for
* {@link RMContext#create(String, String)}. * {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContext#create(String, String)}.
* when the parent does not exist. * when the parent does not exist.
*/ */
@Test @Test
@ -249,7 +248,7 @@ public class RMContextTest extends JerseyTest {
/** /**
* Test method for * Test method for
* {@link RMContext#delete(String, String)} * {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContext#delete(String, String)}
* *
* @throws Exception * @throws Exception
*/ */
@ -281,7 +280,7 @@ public class RMContextTest extends JerseyTest {
/** /**
* Test method for * Test method for
* {@link RMContext#delete(String, String)} * {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContext#delete(String, String)}
*/ */
@Test @Test
public void step5_DeleteParent() { public void step5_DeleteParent() {