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/matchers/JUnitMatchers.java
package org.junit.matchers;
import org.hamcrest.CoreMatchers;
import org.hamcrest.Matcher;
import org.hamcrest.core.CombinableMatcher.CombinableBothMatcher;
import org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher;
import org.junit.internal.matchers.StacktracePrintingMatcher;
/**
* Convenience import class: these are useful matchers for use with the assertThat method, but they are
* not currently included in the basic CoreMatchers class from hamcrest.
*
* @since 4.4
*/
public class JUnitMatchers {
/**
* @return A matcher matching any collection containing element
* @deprecated Please use {@link CoreMatchers#hasItem(Object)} instead.
*/
@Deprecated
public static <T> Matcher<Iterable<? super T>> hasItem(T element) {
return CoreMatchers.hasItem(element);
}
/**
* @return A matcher matching any collection containing an element matching elementMatcher
* @deprecated Please use {@link CoreMatchers#hasItem(Matcher)} instead.
*/
@Deprecated
public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> elementMatcher) {
return CoreMatchers.<T>hasItem(elementMatcher);
}
/**
* @return A matcher matching any collection containing every element in elements
* @deprecated Please use {@link CoreMatchers#hasItems(Object...)} instead.
*/
@Deprecated
public static <T> Matcher<Iterable<T>> hasItems(T... elements) {
return CoreMatchers.hasItems(elements);
}
/**
* @return A matcher matching any collection containing at least one element that matches
* each matcher in elementMatcher (this may be one element matching all matchers,
* or different elements matching each matcher)
* @deprecated Please use {@link CoreMatchers#hasItems(Matcher...)} instead.
*/
@Deprecated
public static <T> Matcher<Iterable<T>> hasItems(Matcher<? super T>... elementMatchers) {
return CoreMatchers.hasItems(elementMatchers);
}
/**
* @return A matcher matching any collection in which every element matches elementMatcher
* @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead.
*/
@Deprecated
public static <T> Matcher<Iterable<T>> everyItem(final Matcher<T> elementMatcher) {
return CoreMatchers.everyItem(elementMatcher);
}
/**
* @return a matcher matching any string that contains substring
* @deprecated Please use {@link CoreMatchers#containsString(String)} instead.
*/
@Deprecated
public static Matcher<java.lang.String> containsString(java.lang.String substring) {
return CoreMatchers.containsString(substring);
}
/**
* This is useful for fluently combining matchers that must both pass. For example:
* <pre>
* assertThat(string, both(containsString("a")).and(containsString("b")));
* </pre>
*
* @deprecated Please use {@link CoreMatchers#both(Matcher)} instead.
*/
@Deprecated
public static <T> CombinableBothMatcher<T> both(Matcher<? super T> matcher) {
return CoreMatchers.both(matcher);
}
/**
* This is useful for fluently combining matchers where either may pass, for example:
* <pre>
* assertThat(string, either(containsString("a")).or(containsString("b")));
* </pre>
*
* @deprecated Please use {@link CoreMatchers#either(Matcher)} instead.
*/
@Deprecated
public static <T> CombinableEitherMatcher<T> either(Matcher<? super T> matcher) {
return CoreMatchers.either(matcher);
}
/**
* @return A matcher that delegates to throwableMatcher and in addition
* appends the stacktrace of the actual Throwable in case of a mismatch.
*/
public static <T extends Throwable> Matcher<T> isThrowable(Matcher<T> throwableMatcher) {
return StacktracePrintingMatcher.isThrowable(throwableMatcher);
}
/**
* @return A matcher that delegates to exceptionMatcher and in addition
* appends the stacktrace of the actual Exception in case of a mismatch.
*/
public static <T extends Exception> Matcher<T> isException(Matcher<T> exceptionMatcher) {
return StacktracePrintingMatcher.isException(exceptionMatcher);
}
}
⏎ org/junit/matchers/JUnitMatchers.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, ≈80🔥, 0💬
Popular Posts:
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
What JAR files are required to run sax\Counter.java provided in the Apache Xerces package? You can f...
What Is commons-net-ftp-2.0.jar? commons-net-ftp-2.0.jar is the JAR file for Apache Commons Net FTP ...
What Is jsse.jar (JDK 6) Java Secure Socket Extension? jsse.jar, Java Secure Socket Extension, is Ja...