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, ≈73🔥, 0💬
Popular Posts:
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
JDK 17 java.xml.crypto.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) Crypto modu...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
How to download and install xml-commons External Source Package? The source package contains Java so...