use of org.wildfly.swarm.spi.api.JARArchive in project wildfly-swarm by wildfly-swarm.
the class SecurityTest method testFractionMatchingAnnotation.
@Test
public void testFractionMatchingAnnotation() throws Exception {
JARArchive archive = ShrinkWrap.create(JARArchive.class);
archive.addClass(SecurityEndpoint.class);
FractionUsageAnalyzer analyzer = new FractionUsageAnalyzer();
final File out = Files.createTempFile(archive.getName(), ".war").toFile();
out.deleteOnExit();
archive.as(ZipExporter.class).exportTo(out, true);
analyzer.source(out);
assertThat(analyzer.detectNeededFractions().stream().filter(fd -> fd.getArtifactId().equals("security")).count()).isEqualTo(1);
}
use of org.wildfly.swarm.spi.api.JARArchive in project wildfly-swarm by wildfly-swarm.
the class SecurityTest method testFractionMatchingWebXML.
@Test
public void testFractionMatchingWebXML() throws Exception {
JARArchive archive = ShrinkWrap.create(JARArchive.class);
archive.addAsResource("WEB-INF/web.xml");
FractionUsageAnalyzer analyzer = new FractionUsageAnalyzer();
final File out = Files.createTempFile(archive.getName(), ".war").toFile();
out.deleteOnExit();
archive.as(ZipExporter.class).exportTo(out, true);
analyzer.source(out);
assertThat(analyzer.detectNeededFractions().stream().filter(fd -> fd.getArtifactId().equals("security")).count()).isEqualTo(1);
}
use of org.wildfly.swarm.spi.api.JARArchive in project wildfly-swarm by wildfly-swarm.
the class ArqModClusterTest method createDeployment.
@Deployment
public static Archive createDeployment() {
JARArchive deployment = ShrinkWrap.create(JARArchive.class);
deployment.add(EmptyAsset.INSTANCE, "nothing");
return deployment;
}
use of org.wildfly.swarm.spi.api.JARArchive in project wildfly-swarm by wildfly-swarm.
the class MonitorArquillianTest method createDeployment.
@Deployment(testable = false)
public static Archive createDeployment() {
JARArchive deployment = ShrinkWrap.create(JARArchive.class);
deployment.add(EmptyAsset.INSTANCE, "nothing");
return deployment;
}
use of org.wildfly.swarm.spi.api.JARArchive in project wildfly-swarm by wildfly-swarm.
the class ConfigRemoteMessagingArquillianTest method createDeployment.
@Deployment
public static Archive createDeployment() {
JARArchive deployment = ShrinkWrap.create(JARArchive.class);
deployment.add(EmptyAsset.INSTANCE, "nothing");
deployment.addModule("org.wildfly.swarm.messaging");
return deployment;
}
Aggregations