org.ops4j.pax.exam.junit.internal
Class JUnit4TestMethod

java.lang.Object
  extended by org.junit.internal.runners.TestMethod
      extended by org.ops4j.pax.exam.junit.internal.JUnit4TestMethod

public class JUnit4TestMethod
extends org.junit.internal.runners.TestMethod

A TestMethod that upon invokation starts a TestContainer and executes the test in the test container.

Since:
0.3.0 December 16, 2008
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Constructor Summary
JUnit4TestMethod(java.lang.reflect.Method testMethod, org.junit.internal.runners.TestClass testClass, FrameworkOption frameworkOption, Option... userOptions)
          Constructor.
 
Method Summary
 java.lang.String getName()
          Getter.
 java.lang.reflect.Method getTestMethod()
          Getter.
 void invoke(java.lang.Object test)
           Starts the test container, installs the test bundle and executes the test within the container.
 
Methods inherited from class org.junit.internal.runners.TestMethod
getExpectedException, getTimeout, isIgnored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnit4TestMethod

public JUnit4TestMethod(java.lang.reflect.Method testMethod,
                        org.junit.internal.runners.TestClass testClass,
                        FrameworkOption frameworkOption,
                        Option... userOptions)
Constructor.

Parameters:
testMethod - test method (cannot be null)
testClass - test class (cannot be null)
frameworkOption - framework option (on which framework the test method should be run) (can be null = default framework)
userOptions - user options (can be null)
Method Detail

invoke

public void invoke(java.lang.Object test)
            throws java.lang.IllegalArgumentException,
                   java.lang.IllegalAccessException,
                   java.lang.reflect.InvocationTargetException
Starts the test container, installs the test bundle and executes the test within the container.

Overrides:
invoke in class org.junit.internal.runners.TestMethod
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getTestMethod

public java.lang.reflect.Method getTestMethod()
Getter.

Returns:
test method

getName

public java.lang.String getName()
Getter.

Returns:
test method name


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.