RuntimeHarnessImpl@Deprecated public class NXRuntimeTestCase extends RuntimeHarnessImpl
The runtime service itself is conveniently available as the runtime instance variable in derived
classes.
Warning: NXRuntimeTestCase subclasses must
| Modifier and Type | Field and Description |
|---|---|
protected List<String[]> |
deploymentStack
Deprecated.
|
protected boolean |
isTestUnit
Deprecated.
Set to true when the instance of this class is a JUnit test case.
|
protected org.jmock.Mockery |
jmcontext
Deprecated.
|
protected boolean |
restart
Deprecated.
|
bundleLoader, bundles, frameworkStarted, osgi, readUris, runtime, runtimeBundle, targetResourceLocator, urls, wdConfigs, workingDir| Constructor and Description |
|---|
NXRuntimeTestCase()
Deprecated.
Used when subclassing to create standalone test cases
|
NXRuntimeTestCase(Class<?> clazz)
Deprecated.
Used by the features runner to manage the Nuxeo framework
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyInlineDeployments()
Deprecated.
Should be called by subclasses after one or more inline deployments are made inside a test method.
|
void |
deployContrib(String uri)
Deprecated.
Deploy a contribution specified as a "bundleName:path" uri
|
protected void |
deployContrib(URL url)
Deprecated.
|
static URL |
getResource(String name)
Deprecated.
|
protected OSGiRuntimeService |
handleNewRuntime(OSGiRuntimeService aRuntime)
Deprecated.
|
static URL[] |
introspectClasspath(ClassLoader loader)
Deprecated.
|
protected static boolean |
isVersionSuffix(String s)
Deprecated.
|
protected URL |
lookupBundleUrl(String bundle)
Deprecated.
Resolves an URL for bundle deployment code.
|
void |
popInlineDeployments()
Deprecated.
Remove the latest deployed components using
pushInlineDeployments(String...). |
void |
popInlineDeployments(int index)
Deprecated.
|
protected void |
postSetUp()
Deprecated.
Called after framework was started (at the end of setUp).
|
void |
pushInlineDeployments(String... deploymentUris)
Deprecated.
Hot deploy the given components (identified by an URI).
|
protected void |
removeInlineDeployments()
Deprecated.
Should be called by subclasses to remove any inline deployments made in the current test method.
|
void |
restart()
Deprecated.
Restarts the runtime and preserve homes directory.
|
protected void |
setUp()
Deprecated.
Implementors should override this method to setup tests and not the
startRuntime() method. |
void |
start()
Deprecated.
|
void |
startRuntime()
Deprecated.
|
void |
stop()
Deprecated.
|
void |
stopRuntime()
Deprecated.
|
protected void |
tearDown()
Deprecated.
Implementors should override this method to implement any specific test tear down and not the
stopRuntime() method |
void |
undeployContrib(String uri)
Deprecated.
|
addWorkingDirectoryConfigurator, deployBundle, deployContrib, deployFolder, deployPartial, deployPartialComponent, deployTestContrib, deployTestContrib, fireFrameworkStarted, getClassLoaderFiles, getContext, getOSGiAdapter, getProperties, getWorkingDir, initOsgiRuntime, initUrls, introspectClasspath, isAnEmptyTestProperty, isRestart, isStarted, listBundleComponents, lookupBundle, readSymbolicName, undeployContrib, wipeEmptyTestSystemProperties, wipeRuntimeprotected org.jmock.Mockery jmcontext
protected boolean restart
protected List<String[]> deploymentStack
protected final boolean isTestUnit
public NXRuntimeTestCase()
public NXRuntimeTestCase(Class<?> clazz)
public void restart() throws Exception
restart in interface RuntimeHarnessrestart in class RuntimeHarnessImplExceptionpublic void start() throws Exception
start in interface RuntimeHarnessstart in class RuntimeHarnessImplExceptionpublic void startRuntime() throws Exception
Exceptionprotected void setUp() throws Exception
startRuntime() method. This method
should contain all the bundle or component deployments needed by the tests. At the time this method is called the
components are not yet started. If you need to perform component/service lookups use instead the
postSetUp() methodExceptionprotected void tearDown() throws Exception
stopRuntime() methodExceptionprotected void postSetUp() throws Exception
Exceptionpublic void stopRuntime() throws Exception
Exceptionpublic void stop() throws Exception
stop in interface RuntimeHarnessstop in class RuntimeHarnessImplExceptionprotected OSGiRuntimeService handleNewRuntime(OSGiRuntimeService aRuntime)
public static URL[] introspectClasspath(ClassLoader loader)
public static URL getResource(String name)
protected void deployContrib(URL url)
public void deployContrib(String uri) throws Exception
Exceptionpublic void undeployContrib(String uri) throws Exception
Exceptionprotected static boolean isVersionSuffix(String s)
protected URL lookupBundleUrl(String bundle)
TODO: Implementation could be finer...
protected void applyInlineDeployments() throws Exception
postSetUp() for convenience.Exceptionprotected void removeInlineDeployments() throws Exception
postSetUp() for convenience.Exceptionpublic void pushInlineDeployments(String... deploymentUris) throws Exception
popInlineDeployments()
A component URI is of the form: bundleSymbolicName:pathToComponentXmlInBundle
Exceptionpublic void popInlineDeployments() throws Exception
pushInlineDeployments(String...).Exceptionpublic void popInlineDeployments(int index) throws Exception
ExceptionCopyright © 2019 Nuxeo. All rights reserved.