org.glassfish.jersey.test.ServletDeploymentContext Java Examples
The following examples show how to use
org.glassfish.jersey.test.ServletDeploymentContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DependencyResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(DependencyResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #2
Source File: NotificationPublisherResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(NotificationPublisherResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #3
Source File: CweResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(CweResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #4
Source File: NotificationRuleResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(NotificationRuleResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #5
Source File: VulnerabilityResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(VulnerabilityResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #6
Source File: CalculatorResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(CalculatorResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #7
Source File: UserResourceAuthenticatedTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(UserResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #8
Source File: PermissionResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(PermissionResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #9
Source File: ComponentResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(ComponentResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #10
Source File: LdapResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(LdapResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #11
Source File: ProjectResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(ProjectResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #12
Source File: BomResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(BomResource.class) .register(AuthenticationFilter.class) .register(MultiPartFeature.class))) .build(); }
Example #13
Source File: AnalysisResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(AnalysisResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #14
Source File: TeamResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(TeamResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #15
Source File: LicenseResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(LicenseResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #16
Source File: RepositoryResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(RepositoryResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #17
Source File: ProjectPropertyResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(ProjectPropertyResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #18
Source File: AbstractRestTest.java From usergrid with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { if ( context == null ) { context = ServletDeploymentContext.builder( configure() ) .addListener( StartupListener.class ).build(); } return context; }
Example #19
Source File: AuthBaseTest.java From dropwizard-java8 with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, "0"); return ServletDeploymentContext.builder(getDropwizardResourceConfig()) .initParam(ServletProperties.JAXRS_APPLICATION_CLASS, getDropwizardResourceConfigClass().getName()) .build(); }
Example #20
Source File: NoAuthPrincipalEntityTest.java From dropwizard-java8 with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, "0"); return ServletDeploymentContext .builder(new NoAuthPrincipalInjectedResourceConfig()) .initParam(ServletProperties.JAXRS_APPLICATION_CLASS, NoAuthPrincipalInjectedResourceConfig.class.getName()) .build(); }
Example #21
Source File: AbstractServingTest.java From oryx with Apache License 2.0 | 5 votes |
@Override protected final DeploymentContext configureDeployment() { configureProperties(); String joinedPackages = String.join(",", getResourcePackages()) + ",com.cloudera.oryx.lambda.serving"; return ServletDeploymentContext.builder(OryxApplication.class) .initParam("javax.ws.rs.Application", OryxApplication.class.getName()) .contextParam(OryxApplication.class.getName() + ".packages", joinedPackages) .addListener(getInitListenerClass()) .build(); }
Example #22
Source File: AuthBaseTest.java From dropwizard-auth-jwt with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, "0"); return ServletDeploymentContext.builder(getDropwizardResourceConfig()) .initParam(JAXRS_APPLICATION_CLASS, getDropwizardResourceConfigClass().getName()) .build(); }
Example #23
Source File: HttpClientSourceIT.java From datacollector with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet( new ServletContainer( new ResourceConfig( Sets.newHashSet( StreamResource.class, NewlineStreamResource.class, TextStreamResource.class, SlowTextStreamResource.class, XmlStreamResource.class, PreemptiveAuthResource.class, AuthResource.class, HeaderRequired.class, AlwaysUnauthorized.class, HttpStageTestUtil.TestPostCustomType.class, StreamTokenResetResource.class, Auth2Resource.class, Auth2ResourceOwnerWithIdResource.class, Auth2BasicResource.class, Auth2JWTResource.class, JsonArrayResource.class ) ) ) ).build(); }
Example #24
Source File: ConfigPropertyResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(ConfigPropertyResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #25
Source File: FindingResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(FindingResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #26
Source File: TestHttpTarget.java From datacollector with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, String.valueOf(NetworkUtils.getRandomPort())); ResourceConfig resourceConfig = new ResourceConfig(MockServer.class); resourceConfig.register(SnappyReaderInterceptor.class); return ServletDeploymentContext.forServlet( new ServletContainer(resourceConfig) ).build(); }
Example #27
Source File: BaseHttpTargetTest.java From datacollector with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { forceSet(TestProperties.CONTAINER_PORT, String.valueOf(NetworkUtils.getRandomPort())); ResourceConfig resourceConfig = new ResourceConfig(MockServer.class); return ServletDeploymentContext.forServlet( new ServletContainer(resourceConfig) ).build(); }
Example #28
Source File: SearchResourceTest.java From dependency-track with Apache License 2.0 | 5 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(SearchResource.class) .register(AuthenticationFilter.class))) .build(); }
Example #29
Source File: UserResourceUnauthenticatedTest.java From dependency-track with Apache License 2.0 | 4 votes |
@Override protected DeploymentContext configureDeployment() { return ServletDeploymentContext.forServlet(new ServletContainer( new ResourceConfig(UserResource.class))) .build(); }
Example #30
Source File: JerseyGrizzlyServletRule.java From jax-rs-pac4j with Apache License 2.0 | 4 votes |
@Override protected DeploymentContext configureDeployment(ResourceConfig config) { return ServletDeploymentContext.forServlet(new ServletContainer(config)).build(); }