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/runner/notification/Failure.java
package org.junit.runner.notification;
import java.io.Serializable;
import org.junit.internal.Throwables;
import org.junit.runner.Description;
/**
* A <code>Failure</code> holds a description of the failed test and the
* exception that was thrown while running it. In most cases the {@link org.junit.runner.Description}
* will be of a single test. However, if problems are encountered while constructing the
* test (for example, if a {@link org.junit.BeforeClass} method is not static), it may describe
* something other than a single test.
*
* @since 4.0
*/
public class Failure implements Serializable {
private static final long serialVersionUID = 1L;
/*
* We have to use the f prefix until the next major release to ensure
* serialization compatibility.
* See https://github.com/junit-team/junit4/issues/976
*/
private final Description fDescription;
private final Throwable fThrownException;
/**
* Constructs a <code>Failure</code> with the given description and exception.
*
* @param description a {@link org.junit.runner.Description} of the test that failed
* @param thrownException the exception that was thrown while running the test
*/
public Failure(Description description, Throwable thrownException) {
this.fThrownException = thrownException;
this.fDescription = description;
}
/**
* @return a user-understandable label for the test
*/
public String getTestHeader() {
return fDescription.getDisplayName();
}
/**
* @return the raw description of the context of the failure.
*/
public Description getDescription() {
return fDescription;
}
/**
* @return the exception thrown
*/
public Throwable getException() {
return fThrownException;
}
@Override
public String toString() {
return getTestHeader() + ": " + fThrownException.getMessage();
}
/**
* Gets the printed form of the exception and its stack trace.
*/
public String getTrace() {
return Throwables.getStacktrace(getException());
}
/**
* Gets a the printed form of the exception, with a trimmed version of the stack trace.
* This method will attempt to filter out frames of the stack trace that are below
* the test method call.
*/
public String getTrimmedTrace() {
return Throwables.getTrimmedStackTrace(getException());
}
/**
* Convenience method
*
* @return the message of the thrown exception
*/
public String getMessage() {
return getException().getMessage();
}
}
⏎ org/junit/runner/notification/Failure.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, ≈110🔥, 0💬
Popular Posts:
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...
Where to get the Java source code for Connector/J 8.0 User Impl module? Java source code files for C...
How to download and install ojdbc7.jar for Oracle 12c R1? ojdbc8.jar for Oracle 12c R1 is a Java 7 a...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...