Java Code Examples for org.wildfly.swarm.undertow.WARArchive#addClass()
The following examples show how to use
org.wildfly.swarm.undertow.WARArchive#addClass() .
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: EESecurityTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(MyApplication.class); deployment.addClass(MyResource.class); deployment.addClass(SimpleAuthenticationMechanism.class); deployment.addClass(SimpleIdentityStore.class); deployment.addAsWebInfResource("jboss-web.xml"); return deployment; }
Example 2
Source File: RolesMapPropertiesTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive<?> createDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(RolesMapEndpoint.class); deployment.addClass(TestApplication.class); deployment.addAsResource("project-simple-config-roles-map.yml", "project-defaults.yml"); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 3
Source File: JAXPOverrideTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class, "services.war"); deployment.addAsLibraries(Maven.resolver().resolve("saxon:saxon:8.7").withTransitivity().asFile()); deployment.addClass(ServicesServlet.class); deployment.addClass(TransformerServlet.class); return deployment; }
Example 4
Source File: ApplicationScopedPrincipalLeakTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ApplicationScopedSubjectExposingResource.class); deployment.addClass(TestApplication.class); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 5
Source File: SimpleLoginConfigTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ApplicationScopedSubjectExposingResource.class); deployment.addClass(SimpleLoginConfigApplication.class); deployment.addAsResource(new ClassLoaderAsset("keys/public-key.pem"), "public-key.pem"); return deployment; }
Example 6
Source File: KeycloakTokenTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(KeycloakTokenResource.class); deployment.addClass(TestApplication.class); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 7
Source File: ContentTypesTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ContentTypesResource.class); deployment.addClass(TestApplication.class); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 8
Source File: ParametrizedPathsTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ParametrizedPathsResource.class); deployment.addClass(TestApplication.class); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 9
Source File: AppWithNoLoginConfigWithConfiguredJwtRealmTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ApplicationScopedSubjectExposingResource.class); deployment.addClass(ApplicationWithoutLoginConfig.class); deployment.addAsResource(new ClassLoaderAsset("keys/public-key.pem"), "public-key.pem"); return deployment; }
Example 10
Source File: AppWithNoLoginConfigAndConfiguredJwtRealmTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(ApplicationScopedSubjectExposingResource.class); deployment.addClass(ApplicationWithoutLoginConfig.class); deployment.addAsResource(new ClassLoaderAsset("keys/public-key.pem"), "public-key.pem"); return deployment; }
Example 11
Source File: EESecurityTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(EESecurityServlet.class); deployment.addClass(SimpleAuthenticationMechanism.class); deployment.addClass(SimpleIdentityStore.class); deployment.addAsWebInfResource("jboss-web.xml"); return deployment; }
Example 12
Source File: JaegerAndMicroprofileOpenTracingTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(JaxrsResource.class); deployment.addClass(JaxrsApplication.class); deployment.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); return deployment; }
Example 13
Source File: SwaggerConfiguredArquillianWebAppTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() throws Exception { WARArchive archive = ShrinkWrap.create(WARArchive.class, "SampleTest.war"); archive.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); archive.addClass(Resource.class); archive.addClass(CustomApplication.class); archive.addAllDependencies(); archive.setContextRoot("/sample"); return archive; }
Example 14
Source File: TraceResolverOnDeploymentTest.java From thorntail with Apache License 2.0 | 5 votes |
@Deployment public static Archive createDeployment() throws Exception { WARArchive deployment = ShrinkWrap.create(WARArchive.class); // on real world deployments, these parts would come from a dependency of the target application deployment.addClass(MockTracerResolver.class); deployment.addPackage(MockTracer.class.getPackage()); deployment.addAsServiceProvider(TracerResolver.class, MockTracerResolver.class); // this is a simple servlet, that we can hit with our tests deployment.addClass(SimpleServlet.class); deployment.addClass(AsyncServlet.class); return deployment; }
Example 15
Source File: PrincipalLeakTest.java From thorntail with Apache License 2.0 | 5 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(SubjectExposingResource.class); deployment.addClass(TestApplication.class); deployment.addAsManifestResource(new ClassLoaderAsset("keys/public-key.pem"), "/MP-JWT-SIGNER"); return deployment; }
Example 16
Source File: JwtTokenCookieTest.java From thorntail with Apache License 2.0 | 4 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(DefaultGroupClaimResource.class); deployment.addClass(TestApplication.class); return deployment; }
Example 17
Source File: JAXRSArchiveTest.java From thorntail with Apache License 2.0 | 4 votes |
@Test public void testDetectJAXRSness_classAnnotation() { WARArchive archive = ShrinkWrap.create( WARArchive.class ); archive.addClass( MyResource.class ); assertThat( JAXRSArchive.isJAXRS( archive )).isTrue(); }
Example 18
Source File: DefaultGroupsClaimTest.java From thorntail with Apache License 2.0 | 4 votes |
protected static WARArchive initDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(DefaultGroupClaimResource.class); deployment.addClass(TestApplication.class); return deployment; }
Example 19
Source File: JAXRSArchiveTest.java From thorntail with Apache License 2.0 | 4 votes |
@Test public void testDetectJAXRSness_methodAnnotation() { WARArchive archive = ShrinkWrap.create( WARArchive.class ); archive.addClass( MyOtherResource.class ); assertThat( JAXRSArchive.isJAXRS( archive )).isTrue(); }
Example 20
Source File: RibbonSecuredArquillianTest.java From thorntail with Apache License 2.0 | 4 votes |
@Deployment(testable = false) public static Archive createDeployment() { WARArchive deployment = ShrinkWrap.create(WARArchive.class); deployment.addClass(TestServlet.class); return deployment; }