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/internal/TextListener.java
package org.junit.internal; import java.io.PrintStream; import java.text.NumberFormat; import java.util.List; import org.junit.runner.Description; import org.junit.runner.Result; import org.junit.runner.notification.Failure; import org.junit.runner.notification.RunListener; public class TextListener extends RunListener { private final PrintStream writer; public TextListener(JUnitSystem system) { this(system.out()); } public TextListener(PrintStream writer) { this.writer = writer; } @Override public void testRunFinished(Result result) { printHeader(result.getRunTime()); printFailures(result); printFooter(result); } @Override public void testStarted(Description description) { writer.append('.'); } @Override public void testFailure(Failure failure) { writer.append('E'); } @Override public void testIgnored(Description description) { writer.append('I'); } /* * Internal methods */ private PrintStream getWriter() { return writer; } protected void printHeader(long runTime) { getWriter().println(); getWriter().println("Time: " + elapsedTimeAsString(runTime)); } protected void printFailures(Result result) { List<Failure> failures = result.getFailures(); if (failures.isEmpty()) { return; } if (failures.size() == 1) { getWriter().println("There was " + failures.size() + " failure:"); } else { getWriter().println("There were " + failures.size() + " failures:"); } int i = 1; for (Failure each : failures) { printFailure(each, "" + i++); } } protected void printFailure(Failure each, String prefix) { getWriter().println(prefix + ") " + each.getTestHeader()); getWriter().print(each.getTrimmedTrace()); } protected void printFooter(Result result) { if (result.wasSuccessful()) { getWriter().println(); getWriter().print("OK"); getWriter().println(" (" + result.getRunCount() + " test" + (result.getRunCount() == 1 ? "" : "s") + ")"); } else { getWriter().println(); getWriter().println("FAILURES!!!"); getWriter().println("Tests run: " + result.getRunCount() + ", Failures: " + result.getFailureCount()); } getWriter().println(); } /** * Returns the formatted string of the elapsed time. Duplicated from * BaseTestRunner. Fix it. */ protected String elapsedTimeAsString(long runTime) { return NumberFormat.getInstance().format((double) runTime / 1000); } }
⏎ org/junit/internal/TextListener.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, 11133👍, 0💬
Popular Posts:
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
JAX-WS is an API for building web services and clients. It is the next generation Web Services API r...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...