org.jboss.osgi.testing
Class OSGiTest
java.lang.Object
org.jboss.osgi.testing.OSGiTest
- Direct Known Subclasses:
- OSGiFrameworkTest, OSGiRuntimeTest
public abstract class OSGiTest
- extends Object
An abstract OSGi Test.
A convenience wrapper for the functionality provided by OSGiTestHelper
.
- Since:
- 25-Sep-2008
- Author:
- Thomas.Diesler@jboss.org
Method Summary |
protected org.jboss.shrinkwrap.api.Archive<?> |
assembleArchive(String name,
String[] resources,
Class<?>... packages)
Delegates to OSGiTestHelper.assembleArchive(String, String[], Class...) |
protected org.jboss.shrinkwrap.api.Archive<?> |
assembleArchive(String name,
String resource,
Class<?>... packages)
Delegates to OSGiTestHelper.assembleArchive(String, String, Class...) |
protected void |
assertBundleState(int expState,
int wasState)
Delegates to OSGiTestHelper.assertBundleState(int, int) |
protected Class<?> |
assertLoadClass(org.osgi.framework.Bundle bundle,
String className)
Delegates to OSGiTestHelper.assertLoadClass(Bundle, String) |
protected void |
assertLoadClassFail(org.osgi.framework.Bundle bundle,
String className)
Delegates to OSGiTestHelper.assertLoadClassFail(Bundle, String) |
protected String |
getFrameworkName()
Delegates to OSGiTestHelper.getFrameworkName() |
protected InitialContext |
getInitialContext()
Delegates to OSGiTestHelper.getInitialContext() |
protected String |
getLongName()
Get the the FQN of this test class. |
protected File |
getResourceFile(String resource)
Delegates to OSGiTestHelper.getResourceFile(String) |
protected URL |
getResourceURL(String resource)
Delegates to OSGiTestHelper.getResourceURL(String) |
protected String |
getServerHost()
Delegates to OSGiTestHelper.getServerHost() |
protected String |
getShortName()
Get the last token in the FQN of this test class. |
protected String |
getTargetContainer()
Delegates to OSGiTestHelper.getTargetContainer() |
protected File |
getTestArchiveFile(String archive)
Delegates to OSGiTestHelper.getTestArchiveFile(String) |
protected String |
getTestArchivePath(String archive)
Delegates to OSGiTestHelper.getTestArchivePath(String) |
protected URL |
getTestArchiveURL(String archive)
Delegates to OSGiTestHelper.getTestArchiveURL(String) |
protected OSGiTestHelper |
getTestHelper()
Get the test helper used by this test
Overwrite if you need to supply another helper
i.e. |
void |
setUp()
Writes a a debug start messge |
void |
tearDown()
Writes a a debug stop messge |
protected VirtualFile |
toVirtualFile(org.jboss.shrinkwrap.api.Archive<?> archive)
Delegates to OSGiTestHelper.toVirtualFile(Archive) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSGiTest
public OSGiTest()
getTestHelper
protected OSGiTestHelper getTestHelper()
- Get the test helper used by this test
Overwrite if you need to supply another helper
i.e. one that you have statically setup
setUp
public void setUp()
throws Exception
- Writes a a debug start messge
- Throws:
Exception
tearDown
public void tearDown()
throws Exception
- Writes a a debug stop messge
- Throws:
Exception
getShortName
protected String getShortName()
- Get the last token in the FQN of this test class.
getLongName
protected String getLongName()
- Get the the FQN of this test class.
getResourceURL
protected URL getResourceURL(String resource)
- Delegates to
OSGiTestHelper.getResourceURL(String)
getResourceFile
protected File getResourceFile(String resource)
- Delegates to
OSGiTestHelper.getResourceFile(String)
getTestArchiveURL
protected URL getTestArchiveURL(String archive)
- Delegates to
OSGiTestHelper.getTestArchiveURL(String)
getTestArchivePath
protected String getTestArchivePath(String archive)
- Delegates to
OSGiTestHelper.getTestArchivePath(String)
getTestArchiveFile
protected File getTestArchiveFile(String archive)
- Delegates to
OSGiTestHelper.getTestArchiveFile(String)
getInitialContext
protected InitialContext getInitialContext()
throws NamingException
- Delegates to
OSGiTestHelper.getInitialContext()
- Throws:
NamingException
getServerHost
protected String getServerHost()
- Delegates to
OSGiTestHelper.getServerHost()
getTargetContainer
protected String getTargetContainer()
- Delegates to
OSGiTestHelper.getTargetContainer()
getFrameworkName
protected String getFrameworkName()
- Delegates to
OSGiTestHelper.getFrameworkName()
assembleArchive
protected org.jboss.shrinkwrap.api.Archive<?> assembleArchive(String name,
String resource,
Class<?>... packages)
throws Exception
- Delegates to
OSGiTestHelper.assembleArchive(String, String, Class...)
- Throws:
Exception
assembleArchive
protected org.jboss.shrinkwrap.api.Archive<?> assembleArchive(String name,
String[] resources,
Class<?>... packages)
throws Exception
- Delegates to
OSGiTestHelper.assembleArchive(String, String[], Class...)
- Throws:
Exception
toVirtualFile
protected VirtualFile toVirtualFile(org.jboss.shrinkwrap.api.Archive<?> archive)
throws IOException,
MalformedURLException
- Delegates to
OSGiTestHelper.toVirtualFile(Archive)
- Throws:
IOException
MalformedURLException
assertBundleState
protected void assertBundleState(int expState,
int wasState)
- Delegates to
OSGiTestHelper.assertBundleState(int, int)
assertLoadClass
protected Class<?> assertLoadClass(org.osgi.framework.Bundle bundle,
String className)
- Delegates to
OSGiTestHelper.assertLoadClass(Bundle, String)
assertLoadClassFail
protected void assertLoadClassFail(org.osgi.framework.Bundle bundle,
String className)
- Delegates to
OSGiTestHelper.assertLoadClassFail(Bundle, String)
Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.