use of org.eclipse.dataspaceconnector.extension.jersey.JerseyRestService in project DataSpaceConnector by eclipse-dataspaceconnector.
the class ContractDefinitionsApiControllerIntegrationTest method prepareWebserver.
@BeforeAll
static void prepareWebserver() {
port = TestUtils.getFreePort();
var monitor = mock(Monitor.class);
var config = new JettyConfiguration(null, null);
config.portMapping(new PortMapping("data", port, "/api/v1/data"));
var jetty = new JettyService(config, monitor);
var ctrl = new ContractDefinitionApiController(monitor);
var jerseyService = new JerseyRestService(jetty, new TypeManager(), mock(CorsFilterConfiguration.class), monitor);
jetty.start();
jerseyService.registerResource("data", ctrl);
jerseyService.start();
}
use of org.eclipse.dataspaceconnector.extension.jersey.JerseyRestService in project DataSpaceConnector by eclipse-dataspaceconnector.
the class PolicyApiControllerIntegrationTest method prepareWebserver.
@BeforeAll
static void prepareWebserver() {
port = TestUtils.getFreePort();
var monitor = mock(Monitor.class);
var config = new JettyConfiguration(null, null);
config.portMapping(new PortMapping("data", port, "/api/v1/data"));
var jetty = new JettyService(config, monitor);
var ctrl = new PolicyApiController(monitor);
var jerseyService = new JerseyRestService(jetty, new TypeManager(), mock(CorsFilterConfiguration.class), monitor);
jetty.start();
jerseyService.registerResource("data", ctrl);
jerseyService.start();
}
use of org.eclipse.dataspaceconnector.extension.jersey.JerseyRestService in project DataSpaceConnector by eclipse-dataspaceconnector.
the class ContractAgreementApiControllerIntegrationTest method prepareWebserver.
@BeforeAll
static void prepareWebserver() {
port = TestUtils.getFreePort();
var monitor = mock(Monitor.class);
var config = new JettyConfiguration(null, null);
config.portMapping(new PortMapping("data", port, "/api/v1/data"));
var jetty = new JettyService(config, monitor);
var ctrl = new ContractAgreementApiController(monitor);
var jerseyService = new JerseyRestService(jetty, new TypeManager(), mock(CorsFilterConfiguration.class), monitor);
jetty.start();
jerseyService.registerResource("data", ctrl);
jerseyService.start();
}
use of org.eclipse.dataspaceconnector.extension.jersey.JerseyRestService in project DataSpaceConnector by eclipse-dataspaceconnector.
the class ContractNegotiationApiControllerIntegrationTest method prepareWebserver.
@BeforeAll
static void prepareWebserver() {
port = TestUtils.getFreePort();
var monitor = mock(Monitor.class);
var config = new JettyConfiguration(null, null);
config.portMapping(new PortMapping("data", port, "/api/v1/data"));
var jetty = new JettyService(config, monitor);
var controller = new ContractNegotiationController(monitor);
var jerseyService = new JerseyRestService(jetty, new TypeManager(), mock(CorsFilterConfiguration.class), monitor);
jetty.start();
jerseyService.registerResource("data", controller);
jerseyService.start();
}
use of org.eclipse.dataspaceconnector.extension.jersey.JerseyRestService in project DataSpaceConnector by eclipse-dataspaceconnector.
the class RemoteDataPlaneSelectorClientTest method startRestApi.
private JettyService startRestApi() {
// set REST API
serviceMock = mock(DataPlaneSelectorService.class);
var controller = new DataplaneSelectorApiController(serviceMock);
var jetty = new JettyService(config, monitor);
var jerseyService = new JerseyRestService(jetty, typeManager, mock(CorsFilterConfiguration.class), monitor);
jetty.start();
jerseyService.registerResource("dataplane", controller);
jerseyService.registerResource("dataplane", new EdcApiExceptionMapper());
jerseyService.start();
return jetty;
}
Aggregations