|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
org.nuxeo.runtime.test.NXRuntimeTestCase
public abstract class NXRuntimeTestCase
Abstract base class for test cases that require a test runtime service.
The runtime service itself is conveniently available as the
runtime instance variable in derived classes.
| Field Summary | |
|---|---|
protected RuntimeService |
runtime
|
protected URL[] |
urls
|
| Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
|---|
ANYTHING, NOT_NULL, NULL |
| Constructor Summary | |
|---|---|
protected |
NXRuntimeTestCase()
|
protected |
NXRuntimeTestCase(String name)
|
| Method Summary | |
|---|---|
void |
deploy(String contrib)
Deprecated. use deployContrib() instead |
void |
deployBundle(String bundle)
Deploy a whole OSGI bundle. |
protected void |
deployContrib(BundleFile bundleFile,
String contrib)
|
void |
deployContrib(String contrib)
Deploys a contribution file by looking for it in the class loader. |
void |
deployContrib(String bundle,
String contrib)
Deploys a contribution from a given bundle. |
protected void |
deployContrib(URL url)
|
static URL |
getResource(String resource)
|
protected void |
initOsgiRuntime()
|
protected void |
initTestRuntime()
|
protected void |
initUrls()
|
protected static boolean |
isVersionSuffix(String s)
|
protected BundleFile |
lookupBundle(String bundle)
|
protected URL |
lookupBundleUrl(String bundle)
Resolves an URL for bundle deployment code. |
protected void |
setUp()
|
protected void |
tearDown()
|
void |
undeploy(String contrib)
Deprecated. use undeployContrib() instead |
void |
undeployContrib(String contrib)
|
protected void |
wipeRuntime()
Makes sure there is no previous runtime hanging around. |
| Methods inherited from class org.jmock.MockObjectTestCase |
|---|
atLeastOnce, defaultMockNameForType, mock, mock, never, newCoreMock, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
| Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
|---|
and, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, isA, newDummy, newDummy, newDummy, not, or, same, stringContains |
| Methods inherited from class org.jmock.core.VerifyingTestCase |
|---|
registerToVerify, runBare, unregisterToVerify, verify |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected RuntimeService runtime
protected URL[] urls
| Constructor Detail |
|---|
protected NXRuntimeTestCase()
protected NXRuntimeTestCase(String name)
| Method Detail |
|---|
protected void setUp()
throws Exception
setUp in class TestCaseException
protected void tearDown()
throws Exception
tearDown in class TestCaseException
protected void initOsgiRuntime()
throws Exception
Exception
protected void initTestRuntime()
throws Exception
Exceptionprotected void initUrls()
protected void wipeRuntime()
throws Exception
This happens for instance if a previous test had errors in its
setUp(), because tearDown has not been called
Exceptionpublic static URL getResource(String resource)
@Deprecated public void deploy(String contrib)
deployContrib() instead
protected void deployContrib(URL url)
public void deployContrib(String contrib)
contrib - the relative path to the contribution file
protected void deployContrib(BundleFile bundleFile,
String contrib)
public void deployContrib(String bundle,
String contrib)
throws Exception
The path will be relative to the bundle root.
Example:
deployContrib("nuxeo-core", "OSGI-INF/CoreExtensions.xml")
bundle - The name of the bundle to peek the contrib incontrib - The path to contrib in the bundle.
Exception@Deprecated public void undeploy(String contrib)
undeployContrib() instead
public void undeployContrib(String contrib)
protected static boolean isVersionSuffix(String s)
protected URL lookupBundleUrl(String bundle)
TODO: Implementation could be finer...
public void deployBundle(String bundle)
throws Exception
bundle - the name of the bundle.
Exception
protected BundleFile lookupBundle(String bundle)
throws Exception
Exception
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||