Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JUnit 4.13.2 Source Code Files
JUnit Source Code Files are provided in the
source package file, junit-4.13.2-sources.jar.
You can browse JUnit Source Code files below:
✍: FYIcenter.com
⏎ org/junit/internal/runners/TestMethod.java
package org.junit.internal.runners;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.Test.None;
import org.junit.runners.BlockJUnit4ClassRunner;
/**
* @deprecated Included for backwards compatibility with JUnit 4.4. Will be
* removed in the next major release. Please use
* {@link BlockJUnit4ClassRunner} in place of {@link JUnit4ClassRunner}.
*/
@Deprecated
public class TestMethod {
private final Method method;
private TestClass testClass;
public TestMethod(Method method, TestClass testClass) {
this.method = method;
this.testClass = testClass;
}
public boolean isIgnored() {
return method.getAnnotation(Ignore.class) != null;
}
public long getTimeout() {
Test annotation = method.getAnnotation(Test.class);
if (annotation == null) {
return 0;
}
long timeout = annotation.timeout();
return timeout;
}
protected Class<? extends Throwable> getExpectedException() {
Test annotation = method.getAnnotation(Test.class);
if (annotation == null || annotation.expected() == None.class) {
return null;
} else {
return annotation.expected();
}
}
boolean isUnexpected(Throwable exception) {
return !getExpectedException().isAssignableFrom(exception.getClass());
}
boolean expectsException() {
return getExpectedException() != null;
}
List<Method> getBefores() {
return testClass.getAnnotatedMethods(Before.class);
}
List<Method> getAfters() {
return testClass.getAnnotatedMethods(After.class);
}
public void invoke(Object test) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
method.invoke(test);
}
}
⏎ org/junit/internal/runners/TestMethod.java
Or download all of them as a single archive file:
File name: junit-4.13.2-sources.jar File size: 234540 bytes Release date: 2021-02-13 Download
⇒ Download and Install junit-4.12.jar
⇐ Download and Install junit-4.13.2.jar
2016-03-28, ≈112🔥, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 17 java.sql.rowset.jmod is the JMOD file for JDK 17 SQL Rowset module. JDK 17 SQL Rowset module ...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...