2022-02-14 17:06:32 +01:00
|
|
|
package org.gcube.application.geoportal.service;
|
|
|
|
|
|
|
|
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
|
2022-03-22 18:07:34 +01:00
|
|
|
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
2022-02-24 18:09:30 +01:00
|
|
|
import org.gcube.application.geoportal.service.profiledDocuments.AbstractProfiledDocumentsTests;
|
2022-02-14 17:06:32 +01:00
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
import javax.ws.rs.client.WebTarget;
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
2022-03-22 18:07:34 +01:00
|
|
|
import static org.junit.Assume.assumeTrue;
|
2022-02-14 17:06:32 +01:00
|
|
|
|
2022-03-04 14:23:20 +01:00
|
|
|
public class InexistentUseCaseDescriptorTests extends AbstractProfiledDocumentsTests {
|
2022-02-16 17:12:54 +01:00
|
|
|
|
2022-02-14 17:06:32 +01:00
|
|
|
@Override
|
|
|
|
protected WebTarget baseTarget() {
|
|
|
|
String testProfileId="profiledConcessioni";
|
|
|
|
return target(InterfaceConstants.Methods.PROJECTS).path(testProfileId);
|
|
|
|
}
|
|
|
|
|
|
|
|
// GET
|
|
|
|
@Test
|
|
|
|
public void testMissingProfile(){
|
2022-03-22 18:07:34 +01:00
|
|
|
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
2022-02-14 17:06:32 +01:00
|
|
|
Response resp = target(InterfaceConstants.Methods.PROJECTS)
|
2022-03-04 14:23:20 +01:00
|
|
|
.path("non-existent-useCaseDescriptor").request().get();
|
2022-02-14 17:06:32 +01:00
|
|
|
assertEquals(404,resp.getStatus());
|
|
|
|
}
|
|
|
|
}
|