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, wipeRuntime
protected 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 RuntimeHarness
restart
in class RuntimeHarnessImpl
Exception
public void start() throws Exception
start
in interface RuntimeHarness
start
in class RuntimeHarnessImpl
Exception
public void startRuntime() throws Exception
Exception
protected 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()
methodException
protected void tearDown() throws Exception
stopRuntime()
methodException
protected void postSetUp() throws Exception
Exception
public void stopRuntime() throws Exception
Exception
public void stop() throws Exception
stop
in interface RuntimeHarness
stop
in class RuntimeHarnessImpl
Exception
protected 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
Exception
public void undeployContrib(String uri) throws Exception
Exception
protected static boolean isVersionSuffix(String s)
protected URL lookupBundleUrl(String bundle)
TODO: Implementation could be finer...
protected void applyInlineDeployments() throws Exception
postSetUp()
for convenience.Exception
protected void removeInlineDeployments() throws Exception
postSetUp()
for convenience.Exception
public void pushInlineDeployments(String... deploymentUris) throws Exception
popInlineDeployments()
A component URI is of the form: bundleSymbolicName:pathToComponentXmlInBundle
Exception
public void popInlineDeployments() throws Exception
pushInlineDeployments(String...)
.Exception
public void popInlineDeployments(int index) throws Exception
Exception
Copyright © 2019 Nuxeo. All rights reserved.