org.jboss.osgi.testing
Class OSGiTest

java.lang.Object
  extended by org.jboss.osgi.testing.OSGiTest

public abstract class OSGiTest
extends java.lang.Object

An abstract OSGi Test. OSGiTest is a convenience wrapper for the functionality provided by OSGiTestHelper.

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

Constructor Summary
protected OSGiTest()
           
 
Method Summary
 org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name, java.lang.String[] resources, java.lang.Class<?>... packages)
           
 org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name, java.lang.String resource, java.lang.Class<?>... packages)
           
 void assertBundleLoadClass(Bundle bundle, java.lang.String expClazz, boolean success)
           
 void assertBundleState(int expState, int wasState)
           
protected  OSGiRuntime getDefaultRuntime()
          Delegates to OSGiTestHelper.getDefaultRuntime()
protected  OSGiRuntime getEmbeddedRuntime()
          Delegates to OSGiTestHelper.getEmbeddedRuntime()
 java.lang.String getFramework()
          Delegates to OSGiTestHelper.getFramework()
 javax.naming.InitialContext getInitialContext()
          Delegates to OSGiTestHelper.getInitialContext()
protected  java.lang.String getLongName()
          Get the the FQN of this test class.
 OSGiRuntime getRemoteRuntime()
          Delegates to OSGiTestHelper.getRemoteRuntime()
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)
 java.lang.String getServerHost()
          Delegates to OSGiTestHelper.getServerHost()
protected  java.lang.String getShortName()
          Get the last token in the FQN of this test class.
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiTest

protected 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.


getDefaultRuntime

protected OSGiRuntime getDefaultRuntime()
Delegates to OSGiTestHelper.getDefaultRuntime()


getEmbeddedRuntime

protected OSGiRuntime getEmbeddedRuntime()
Delegates to OSGiTestHelper.getEmbeddedRuntime()


getRemoteRuntime

public OSGiRuntime getRemoteRuntime()
Delegates to OSGiTestHelper.getRemoteRuntime()


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

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

Throws:
javax.naming.NamingException

getServerHost

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


getTargetContainer

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


getFramework

public java.lang.String getFramework()
Delegates to OSGiTestHelper.getFramework()


assembleBundle

public org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name,
                                                    java.lang.String resource,
                                                    java.lang.Class<?>... packages)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

assembleBundle

public org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name,
                                                    java.lang.String[] resources,
                                                    java.lang.Class<?>... packages)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

assertBundleState

public void assertBundleState(int expState,
                              int wasState)

assertBundleLoadClass

public void assertBundleLoadClass(Bundle bundle,
                                  java.lang.String expClazz,
                                  boolean success)


Copyright © 2009. All Rights Reserved.