use of org.eclipse.dataspaceconnector.extension.jetty.JettyConfiguration 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.jetty.JettyConfiguration 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.jetty.JettyConfiguration 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.jetty.JettyConfiguration 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.jetty.JettyConfiguration in project DataSpaceConnector by eclipse-dataspaceconnector.
the class JerseyRestServiceTest method startJetty.
private void startJetty(PortMapping... mapping) {
JettyConfiguration config = new JettyConfiguration(null, null);
Arrays.stream(mapping).forEach(config::portMapping);
jettyService = new JettyService(config, monitorMock);
jerseyRestService = new JerseyRestService(jettyService, new TypeManager(), CorsFilterConfiguration.none(), monitorMock);
jettyService.start();
}
Aggregations