public abstract class TeleporterRule
extends org.junit.rules.ExternalResource
Modifier and Type | Class and Description |
---|---|
static interface |
TeleporterRule.Customizer
Customizer is used client-side to setup the server URL and other parameters
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLIENT_CLASS
Name of the implementation class to use when running on the client side
|
static java.lang.String |
CUSTOMIZER_PATTERN
Class name pattern for Customizers
|
Modifier and Type | Method and Description |
---|---|
static TeleporterRule |
forClass(java.lang.Class<?> classUnderTest)
Build a TeleporterRule for the given class, with no client setup options
|
static TeleporterRule |
forClass(java.lang.Class<?> classUnderTest,
java.lang.String clientSetupOptions)
Build a TeleporterRule for the given class, with optional clientSetupOptions.
|
<T> T |
getService(java.lang.Class<T> serviceClass)
If running on the server side, get an OSGi service
|
<T> T |
getService(java.lang.Class<T> serviceClass,
java.lang.String ldapFilter)
If running on the server side, get an OSGi service specified by an LDAP service filter
|
static boolean |
isServerSide()
True if running on the server-side.
|
TeleporterRule |
withResources(java.lang.String... paths)
Tell the concrete teleporter to embed resources, based on their path, in
the test bundle.
|
public static final java.lang.String CLIENT_CLASS
public static final java.lang.String CUSTOMIZER_PATTERN
public static boolean isServerSide()
public static TeleporterRule forClass(java.lang.Class<?> classUnderTest)
public static TeleporterRule forClass(java.lang.Class<?> classUnderTest, java.lang.String clientSetupOptions)
clientSetupOptions
- If supplied, the part of that string before the first colon
is used as the class name of a Customizer (or shorthand for that if it contains no dots).
The rest of the string is then passed to the Customizer so that it can be used to define
options (which server to run the test on, etc)public final <T> T getService(java.lang.Class<T> serviceClass)
public <T> T getService(java.lang.Class<T> serviceClass, java.lang.String ldapFilter)
public TeleporterRule withResources(java.lang.String... paths)
paths
- 0..N resource paths to add to the current rule. A path that
ends with a / causes all resources found under it
to be recursively embedded as well.Copyright © 2010 - 2020 Adobe. All Rights Reserved