carbidecpp22devenv/plugins/org.eclipse.test.source_3.5.0.r20080925/src/org.junit4_4.5.0.v20090423/junitsrc/org/junit/internal/runners/statements/InvokeMethod.java
author cawthron
Fri, 04 Dec 2009 11:49:54 -0600
changeset 636 3ef299ba838f
permissions -rw-r--r--
add files for RCL_2_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
636
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     1
/**
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     2
 * 
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     3
 */
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     4
package org.junit.internal.runners.statements;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     5
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     6
import org.junit.runners.model.FrameworkMethod;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     7
import org.junit.runners.model.Statement;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     8
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
     9
public class InvokeMethod extends Statement {
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    10
	private final FrameworkMethod fTestMethod;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    11
	private Object fTarget;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    12
	
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    13
	public InvokeMethod(FrameworkMethod testMethod, Object target) {
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    14
		fTestMethod= testMethod;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    15
		fTarget= target;
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    16
	}
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    17
	
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    18
	@Override
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    19
	public void evaluate() throws Throwable {
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    20
		fTestMethod.invokeExplosively(fTarget);
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    21
	}
3ef299ba838f add files for RCL_2_2
cawthron
parents:
diff changeset
    22
}