org.jboss.osgi.testing
Class OSGiTest

java.lang.Object
  extended by org.jboss.osgi.testing.OSGiTest
Direct Known Subclasses:
OSGiFrameworkTest, OSGiRuntimeTest

public abstract class OSGiTest
extends java.lang.Object

An abstract OSGi Test. A convenience wrapper for the functionality provided by OSGiTestHelper.

Since:
25-Sep-2008
Author:
Thomas.Diesler@jboss.org

Constructor Summary
OSGiTest()
           
 
Method Summary
protected  org.jboss.shrinkwrap.api.Archive<?> assembleArchive(java.lang.String name, java.lang.String[] resources, java.lang.Class<?>... packages)
          Delegates to OSGiTestHelper.assembleArchive(String, String[], Class...)
protected  org.jboss.shrinkwrap.api.Archive<?> assembleArchive(java.lang.String name, java.lang.String resource, java.lang.Class<?>... packages)
          Delegates to OSGiTestHelper.assembleArchive(String, String, Class...)
protected  void assertBundleState(int expState, int wasState)
          Delegates to OSGiTestHelper.assertBundleState(int, int)
protected  java.lang.Class<?> assertLoadClass(org.osgi.framework.Bundle bundle, java.lang.String className)
          Delegates to OSGiTestHelper.assertLoadClass(Bundle, String)
protected  void assertLoadClassFail(org.osgi.framework.Bundle bundle, java.lang.String className)
          Delegates to OSGiTestHelper.assertLoadClassFail(Bundle, String)
protected  java.lang.String getFrameworkName()
          Delegates to OSGiTestHelper.getFrameworkName()
protected  javax.naming.InitialContext getInitialContext()
          Delegates to OSGiTestHelper.getInitialContext()
protected  java.lang.String getLongName()
          Get the the FQN of this test class.
protected  java.io.File getResourceFile(java.lang.String resource)
          Delegates to OSGiTestHelper.getResourceFile(String)
protected  java.net.URL getResourceURL(java.lang.String resource)
          Delegates to OSGiTestHelper.getResourceURL(String)
protected  java.lang.String getServerHost()
          Delegates to OSGiTestHelper.getServerHost()
protected  java.lang.String getShortName()
          Get the last token in the FQN of this test class.
protected  java.lang.String getTargetContainer()
          Delegates to OSGiTestHelper.getTargetContainer()
protected  java.io.File getTestArchiveFile(java.lang.String archive)
          Delegates to OSGiTestHelper.getTestArchiveFile(String)
protected  java.lang.String getTestArchivePath(java.lang.String archive)
          Delegates to OSGiTestHelper.getTestArchivePath(String)
protected  java.net.URL getTestArchiveURL(java.lang.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  org.jboss.osgi.vfs.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
 

Constructor Detail

OSGiTest

public OSGiTest()
Method Detail

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 java.lang.Exception
Writes a a debug start messge

Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Writes a a debug stop messge

Throws:
java.lang.Exception

getShortName

protected java.lang.String getShortName()
Get the last token in the FQN of this test class.


getLongName

protected java.lang.String getLongName()
Get the the FQN of this test class.


getResourceURL

protected java.net.URL getResourceURL(java.lang.String resource)
Delegates to OSGiTestHelper.getResourceURL(String)


getResourceFile

protected java.io.File getResourceFile(java.lang.String resource)
Delegates to OSGiTestHelper.getResourceFile(String)


getTestArchiveURL

protected java.net.URL getTestArchiveURL(java.lang.String archive)
Delegates to OSGiTestHelper.getTestArchiveURL(String)


getTestArchivePath

protected java.lang.String getTestArchivePath(java.lang.String archive)
Delegates to OSGiTestHelper.getTestArchivePath(String)


getTestArchiveFile

protected java.io.File getTestArchiveFile(java.lang.String archive)
Delegates to OSGiTestHelper.getTestArchiveFile(String)


getInitialContext

protected javax.naming.InitialContext getInitialContext()
                                                 throws javax.naming.NamingException
Delegates to OSGiTestHelper.getInitialContext()

Throws:
javax.naming.NamingException

getServerHost

protected java.lang.String getServerHost()
Delegates to OSGiTestHelper.getServerHost()


getTargetContainer

protected java.lang.String getTargetContainer()
Delegates to OSGiTestHelper.getTargetContainer()


getFrameworkName

protected java.lang.String getFrameworkName()
Delegates to OSGiTestHelper.getFrameworkName()


assembleArchive

protected org.jboss.shrinkwrap.api.Archive<?> assembleArchive(java.lang.String name,
                                                              java.lang.String resource,
                                                              java.lang.Class<?>... packages)
                                                       throws java.lang.Exception
Delegates to OSGiTestHelper.assembleArchive(String, String, Class...)

Throws:
java.lang.Exception

assembleArchive

protected org.jboss.shrinkwrap.api.Archive<?> assembleArchive(java.lang.String name,
                                                              java.lang.String[] resources,
                                                              java.lang.Class<?>... packages)
                                                       throws java.lang.Exception
Delegates to OSGiTestHelper.assembleArchive(String, String[], Class...)

Throws:
java.lang.Exception

toVirtualFile

protected org.jboss.osgi.vfs.VirtualFile toVirtualFile(org.jboss.shrinkwrap.api.Archive<?> archive)
                                                throws java.io.IOException,
                                                       java.net.MalformedURLException
Delegates to OSGiTestHelper.toVirtualFile(Archive)

Throws:
java.io.IOException
java.net.MalformedURLException

assertBundleState

protected void assertBundleState(int expState,
                                 int wasState)
Delegates to OSGiTestHelper.assertBundleState(int, int)


assertLoadClass

protected java.lang.Class<?> assertLoadClass(org.osgi.framework.Bundle bundle,
                                             java.lang.String className)
Delegates to OSGiTestHelper.assertLoadClass(Bundle, String)


assertLoadClassFail

protected void assertLoadClassFail(org.osgi.framework.Bundle bundle,
                                   java.lang.String className)
Delegates to OSGiTestHelper.assertLoadClassFail(Bundle, String)



Copyright © 2010. All Rights Reserved.