use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.
the class SwaggerWebAppDefaultUrlChangerArquillianTest method newContainer.
@CreateSwarm
public static Swarm newContainer() throws Exception {
Swarm swarm = new Swarm();
swarm.fraction(new CDIFraction());
swarm.withProfile("application-path");
return swarm;
}
use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.
the class AnnotationBasedMain method main.
public static void main(String... args) throws Exception {
if (System.getProperty("boot.module.loader") == null) {
System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader");
}
String clsName = System.getProperty(ANNOTATED_CLASS_NAME);
Class<?> cls = Class.forName(clsName);
Method[] methods = cls.getMethods();
for (Method method : methods) {
if (!Modifier.isStatic(method.getModifiers())) {
continue;
}
CreateSwarm anno = method.getAnnotation(CreateSwarm.class);
if (anno == null) {
continue;
}
boolean startEagerly = anno.startEagerly();
((Swarm) method.invoke(null)).start().deploy();
}
}
use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.
the class MonitorSecurityTest method getContainer.
@CreateSwarm
public static Swarm getContainer() throws Exception {
Swarm container = new Swarm();
container.fraction(new JAXRSFraction());
container.fraction(new MonitorFraction().securityRealm("TestRealm"));
container.fraction(new ManagementFraction().securityRealm("TestRealm", (realm) -> {
realm.inMemoryAuthentication((authn) -> {
authn.add(new Properties() {
{
put("admin", "password");
}
}, true);
});
realm.inMemoryAuthorization();
}));
return container;
}
use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.
the class TopologyWebAppArquillianTest method newContainer.
@CreateSwarm
public static Swarm newContainer() throws Exception {
TopologyWebAppFraction topology = new TopologyWebAppFraction();
topology.proxyService("myService", "/my-proxy");
return new Swarm().fraction(topology).fraction(new JGroupsTopologyFraction());
}
use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.
the class MonitorPayloadTest method getContainer.
@CreateSwarm
public static Swarm getContainer() throws Exception {
Swarm container = new Swarm();
container.fraction(new JAXRSFraction());
container.fraction(new MonitorFraction());
return container;
}
Aggregations