Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
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/runner/notification/SynchronizedRunListener.java
package org.junit.runner.notification; import org.junit.runner.Description; import org.junit.runner.Result; /** * Thread-safe decorator for {@link RunListener} implementations that synchronizes * calls to the delegate. * * <p>This class synchronizes all listener calls on a RunNotifier instance. This is done because * prior to JUnit 4.12, all listeners were called in a synchronized block in RunNotifier, * so no two listeners were ever called concurrently. If we instead made the methods here * synchronized, clients that added multiple listeners that called common code might see * issues due to the reduced synchronization. * * @author Tibor Digana (tibor17) * @author Kevin Cooney (kcooney) * @since 4.12 * * @see RunNotifier */ @RunListener.ThreadSafe final class SynchronizedRunListener extends RunListener { private final RunListener listener; private final Object monitor; SynchronizedRunListener(RunListener listener, Object monitor) { this.listener = listener; this.monitor = monitor; } @Override public void testRunStarted(Description description) throws Exception { synchronized (monitor) { listener.testRunStarted(description); } } @Override public void testRunFinished(Result result) throws Exception { synchronized (monitor) { listener.testRunFinished(result); } } /** * {@inheritDoc} * <p/> * Synchronized decorator for {@link RunListener#testSuiteStarted(Description)}. * @param description the description of the test suite that is about to be run * (generally a class name). * @throws Exception if any occurs. * @since 4.13 */ @Override public void testSuiteStarted(Description description) throws Exception { synchronized (monitor) { listener.testSuiteStarted(description); } } /** * {@inheritDoc} * <p/> * Synchronized decorator for {@link RunListener#testSuiteFinished(Description)}. * @param description the description of the test suite that just ran. * @throws Exception * @since 4.13 */ @Override public void testSuiteFinished(Description description) throws Exception { synchronized (monitor) { listener.testSuiteFinished(description); } } @Override public void testStarted(Description description) throws Exception { synchronized (monitor) { listener.testStarted(description); } } @Override public void testFinished(Description description) throws Exception { synchronized (monitor) { listener.testFinished(description); } } @Override public void testFailure(Failure failure) throws Exception { synchronized (monitor) { listener.testFailure(failure); } } @Override public void testAssumptionFailure(Failure failure) { synchronized (monitor) { listener.testAssumptionFailure(failure); } } @Override public void testIgnored(Description description) throws Exception { synchronized (monitor) { listener.testIgnored(description); } } @Override public int hashCode() { return listener.hashCode(); } @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SynchronizedRunListener)) { return false; } SynchronizedRunListener that = (SynchronizedRunListener) other; return listener.equals(that.listener); } @Override public String toString() { return listener.toString() + " (with synchronization wrapper)"; } }
⏎ org/junit/runner/notification/SynchronizedRunListener.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, 11608👍, 0💬
Popular Posts:
JAX-WS is an API for building web services and clients. It is the next generation Web Services API r...
Apache Commons Lang 3 is the 3rd version of Apache Commons Lang, which provides a host of helper uti...
How to download and install JDK (Java Development Kit) 1.3? If you want to write Java applications, ...
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...