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/rules/TestWatchman.java
package org.junit.rules;
import org.junit.internal.AssumptionViolatedException;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
/**
* TestWatchman is a base class for Rules that take note of the testing
* action, without modifying it. For example, this class will keep a log of each
* passing and failing test:
*
* <pre>
* public static class WatchmanTest {
* private static String watchedLog;
*
* @Rule
* public MethodRule watchman= new TestWatchman() {
* @Override
* public void failed(Throwable e, FrameworkMethod method) {
* watchedLog+= method.getName() + " " + e.getClass().getSimpleName()
* + "\n";
* }
*
* @Override
* public void succeeded(FrameworkMethod method) {
* watchedLog+= method.getName() + " " + "success!\n";
* }
* };
*
* @Test
* public void fails() {
* fail();
* }
*
* @Test
* public void succeeds() {
* }
* }
* </pre>
*
* @since 4.7
* @deprecated Use {@link TestWatcher} (which implements {@link TestRule}) instead.
*/
@Deprecated
public class TestWatchman implements MethodRule {
public Statement apply(final Statement base, final FrameworkMethod method,
Object target) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
starting(method);
try {
base.evaluate();
succeeded(method);
} catch (AssumptionViolatedException e) {
throw e;
} catch (Throwable e) {
failed(e, method);
throw e;
} finally {
finished(method);
}
}
};
}
/**
* Invoked when a test method succeeds
*/
public void succeeded(FrameworkMethod method) {
}
/**
* Invoked when a test method fails
*/
public void failed(Throwable e, FrameworkMethod method) {
}
/**
* Invoked when a test method is about to start
*/
public void starting(FrameworkMethod method) {
}
/**
* Invoked when a test method finishes (whether passing or failing)
*/
public void finished(FrameworkMethod method) {
}
}
⏎ org/junit/rules/TestWatchman.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, ≈51🔥, 0💬
Popular Posts:
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...
What Is mail.jar of JavaMail 1.4.2? I got the JAR file from javamail-1.4.2.zip. mail.jar in javamail...