org.apache.felix.ipojo.junit4osgi.impl
Class JunitExtender

java.lang.Object
  extended by org.apache.felix.ipojo.junit4osgi.impl.JunitExtender
All Implemented Interfaces:
OSGiJunitRunner

public class JunitExtender
extends Object
implements OSGiJunitRunner

Detect test suite from installed bundles.

Author:
Felix Project Team

Field Summary
static String SUITE_METHODNAME
          Suite method name.
 
Constructor Summary
JunitExtender()
           
 
Method Summary
 List getTests()
          Gets the list of Test.
 List getTests(long bundleId)
          Gets the list of Test from the bundle (specified by using the bundle id).
 List run()
          Runs tests.
 List run(long bundleId)
          Runs the tests declared in the bundle (specified by the bundle id).
 junit.framework.TestResult run(junit.framework.Test test)
          Runs the given tests.
 void setResultPrinter(PrintStream pw)
          Set the result printer.
 void starting()
          Start method.
 void stopping()
          Stop method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUITE_METHODNAME

public static final String SUITE_METHODNAME
Suite method name.

See Also:
Constant Field Values
Constructor Detail

JunitExtender

public JunitExtender()
Method Detail

setResultPrinter

public void setResultPrinter(PrintStream pw)
Set the result printer.

Specified by:
setResultPrinter in interface OSGiJunitRunner
Parameters:
pw - the stream to use.
See Also:
OSGiJunitRunner.setResultPrinter(java.io.PrintStream)

run

public List run()
Runs tests.

Specified by:
run in interface OSGiJunitRunner
Returns:
the list of TestResult
See Also:
OSGiJunitRunner.run()

getTests

public List getTests()
Gets the list of Test.

Specified by:
getTests in interface OSGiJunitRunner
Returns:
the list of Test
See Also:
OSGiJunitRunner.getTests()

run

public junit.framework.TestResult run(junit.framework.Test test)
Runs the given tests.

Specified by:
run in interface OSGiJunitRunner
Parameters:
test - the test to execute
Returns:
the result
See Also:
OSGiJunitRunner.run(junit.framework.Test)

getTests

public List getTests(long bundleId)
Gets the list of Test from the bundle (specified by using the bundle id).

Specified by:
getTests in interface OSGiJunitRunner
Parameters:
bundleId - the bundle id
Returns:
the list of Test declared in this bundle.
See Also:
OSGiJunitRunner.getTests(long)

run

public List run(long bundleId)
Runs the tests declared in the bundle (specified by the bundle id).

Specified by:
run in interface OSGiJunitRunner
Parameters:
bundleId - the bundle id
Returns:
the List of TestResult
See Also:
OSGiJunitRunner.run(long)

stopping

public void stopping()
Stop method. Clears test suites.


starting

public void starting()
Start method.



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.