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/ExpectedExceptionMatcherBuilder.java
package org.junit.rules;
import static org.hamcrest.CoreMatchers.allOf;
import static org.junit.matchers.JUnitMatchers.isThrowable;
import java.util.ArrayList;
import java.util.List;
import org.hamcrest.Matcher;
/**
* Builds special matcher used by {@link ExpectedException}.
*/
class ExpectedExceptionMatcherBuilder {
private final List<Matcher<?>> matchers = new ArrayList<Matcher<?>>();
void add(Matcher<?> matcher) {
matchers.add(matcher);
}
boolean expectsThrowable() {
return !matchers.isEmpty();
}
Matcher<Throwable> build() {
return isThrowable(allOfTheMatchers());
}
private Matcher<Throwable> allOfTheMatchers() {
if (matchers.size() == 1) {
return cast(matchers.get(0));
}
return allOf(castedMatchers());
}
@SuppressWarnings({"unchecked", "rawtypes"})
private List<Matcher<? super Throwable>> castedMatchers() {
return new ArrayList<Matcher<? super Throwable>>((List) matchers);
}
@SuppressWarnings("unchecked")
private Matcher<Throwable> cast(Matcher<?> singleMatcher) {
return (Matcher<Throwable>) singleMatcher;
}
}
⏎ org/junit/rules/ExpectedExceptionMatcherBuilder.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, ≈83🔥, 0💬
Popular Posts:
How to download and install ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is a Java 5 J...
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...
If you are a Java developer, it is very often that you need to use some 3rd party libraries to perfo...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...