org.jboss.osgi.husky
Interface Bridge


public interface Bridge

A Bridge intercepts a test and delegates the execution to the same (or another) test in and isolated test environment. An isolated test environment is one that does not have the same class loading space as the test itself. Isolated test environments are for example

Details on test method mapping is given with the individual run methods. The test Request is fieled through an Invoker that that returns a Response for the given test run. Invokers may be arbitarily complex. Local 'in proccess' invokers are possible just as well as remote invokers.
 void testMethod 
 {
    if(isNotInContainer())
    {
       BridgeFactory.getBridge().run();
       return;
    }
    else
    {
       // in container test logic 
       ...
    }
 }
 

Since:
16-May-2009
Author:
Thomas.Diesler@jboss.com

Method Summary
 Class<?> getCallerClass()
          Get the caller's class
 String getCallerFrame()
          Get the caller's concatination of class name and method.
 String getCallerMethod()
          Get the caller's method
 Invoker getInvoker()
          Get the invoker that is associated with this bridge.
 void run()
          Intercepts a test and delegates the execution to the same test in the same test class.
 void run(Class<?> testClass)
          Intercepts a test and delegates the execution to the same test in a different test class.
 void run(Class<?> testClass, String testMethod)
          Intercepts a test and delegates the execution to another test in a different test class.
 void setInvoker(Invoker invoker)
          Set the invoker that is associated with this bridge.
 

Method Detail

getCallerClass

Class<?> getCallerClass()
Get the caller's class


getCallerMethod

String getCallerMethod()
Get the caller's method


getCallerFrame

String getCallerFrame()
Get the caller's concatination of class name and method.


run

void run()
Intercepts a test and delegates the execution to the same test in the same test class. The main use case is that of the same test class beeing deployed in the isolated test environment as well as run from the client test runner.


run

void run(Class<?> testClass)
Intercepts a test and delegates the execution to the same test in a different test class. The main use case is that of one client side test class with the same set of test methods as another test class that runs in the isolated test environment.


run

void run(Class<?> testClass,
         String testMethod)
Intercepts a test and delegates the execution to another test in a different test class. The main use case is that of free mapping between client side tests and tests that run in the isolated test environment.


getInvoker

Invoker getInvoker()
Get the invoker that is associated with this bridge.


setInvoker

void setInvoker(Invoker invoker)
Set the invoker that is associated with this bridge.



Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.