public class TomEEEmbeddedSingleRunner
extends BlockJUnit4ClassRunner
Base is to declare an @Application class which holds the model and some injections. Note: this can be replaced setting tomee.application-composer.application property to the fully qualified name of the app. Note: @Application classes are only searched in the same jar as the test.
Model: - @Configuration: programmatic properties - note injections don't work there. - @Classes: only context value is used. - @ContainerProperties: to configure the container - @WebResource: first value can be used to set the docBase (other values are ignored) - @TomEEEmbeddedSingleRunner.LifecycleTasks: allow to add some lifecycle tasks (like starting a ftp/sft/elasticsearch... server)
Injections: - CDI - @RandomPort: with the value http or https. Supported types are URL (context base) and int (the port).
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
TomEEEmbeddedSingleRunner.Rule  | 
static class  | 
TomEEEmbeddedSingleRunner.Start  | 
| Constructor and Description | 
|---|
TomEEEmbeddedSingleRunner(java.lang.Class<?> klass)  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
close()  | 
protected java.util.List<MethodRule> | 
rules(java.lang.Object test)  | 
static void | 
setApp(java.lang.Object o)  |