@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, "0"); return ServletDeploymentContext.builder(getDropwizardResourceConfig()) .initParam( ServletProperties.JAXRS_APPLICATION_CLASS, getDropwizardResourceConfigClass().getName()) .build(); }
@Override protected DeploymentContext configureDeployment() { final ResourceConfig rc = DropwizardResourceConfig.forTesting(new MetricRegistry()); final Map<String, String> filterParams = ImmutableMap.of(AllowedMethodsFilter.ALLOWED_METHODS_PARAM, "GET,POST"); return ServletDeploymentContext.builder(rc) .addFilter(AllowedMethodsFilter.class, "allowedMethodsFilter", filterParams) .initParam( ServletProperties.JAXRS_APPLICATION_CLASS, DropwizardResourceConfig.class.getName()) .initParam(ServerProperties.PROVIDER_CLASSNAMES, DummyResource.class.getName()) .build(); }
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forPackages(this.getClass().getPackage().getName()) .contextPath("context") .build(); }