This project provides a Hamcrest matcher that gives you better diagnostics for multi-line text in case of mismatches.
import static org.itsallcode.matcher.MultilineTextMatcher.matchesAllLines;
public class TestSomeText {
@Test
public void testMatchesAllLines() {
assertThat("foo\nbar", MultilineTextMatcher.matchesAllLines("foo", "bar"));
}
}
This matcher provides the following features:
- Reports mismatches in the number of lines
- Marks where in the text a mismatch is found
- Makes invisible characters visible (CR, LF, TAB)
The Hamcrest Multiline Text Matcher requires Java 11 to run.
Dependency | Purpose | License |
---|---|---|
Apache Maven | Build tool | Apache License 2.0 |
Java Hamcrest | Checking for conditions in code via matchers | BSD License |
JUnit | Unit testing framework | Eclipse Public License 1.0 |
Plug-in | Purpose | License |
---|---|---|
License Maven Plugin | Adding license information to source files | LGPL3 |
Maven Compiler Plugin | Setting required Java version | Apache License 2.0 |
Maven Enforcer Plugin | Controlling environment constants | Apache License 2.0 |
Maven Failsafe Plugin | Integration testing | Apache License 2.0 |
Maven Jacoco Plugin | Code coverage metering | Eclipse Public License 2.0 |
Maven Javadoc Plugin | Create JAR archive with Javadoc | Apache License 2.0 |
Maven Source Plugin | Create JAR archive with source code | Apache License 2.0 |
Maven Surefire Plugin | Unit testing | Apache License 2.0 |
OSS Index Maven Plugin | Checking Dependencies Vulnerability | ASL2 |
Versions Maven Plugin | Checking if dependencies updates are available | Apache License 2.0 |