https://github.com/itsallcode/hamcrest-multiline-text-matcher
Hamcrest matcher that provides better diagnostics for multi-line mismatches.
https://github.com/itsallcode/hamcrest-multiline-text-matcher
hamcrest-matchers java junit text
Last synced: about 2 months ago
JSON representation
Hamcrest matcher that provides better diagnostics for multi-line mismatches.
- Host: GitHub
- URL: https://github.com/itsallcode/hamcrest-multiline-text-matcher
- Owner: itsallcode
- License: mit
- Created: 2018-09-11T13:45:25.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T17:37:11.000Z (over 1 year ago)
- Last Synced: 2024-12-20T00:31:26.473Z (about 1 year ago)
- Topics: hamcrest-matchers, java, junit, text
- Language: Java
- Size: 89.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# hamcrest-mutliline-text-matcher
This project provides a [Hamcrest](http://hamcrest.org/) matcher that gives you better diagnostics for multi-line text in case of mismatches.
[](https://github.com/itsallcode/hamcrest-mutliline-text-matcher/actions/workflows/build.yml)
[](https://search.maven.org/search?q=g:org.itsallcode%20a:hamcrest-mutliline-text-matcher)
[](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ahamcrest-mutliline-text-matcher)
[](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ahamcrest-mutliline-text-matcher)
## In a Nutshell
```java
import static org.itsallcode.matcher.MultilineTextMatcher.matchesAllLines;
public class TestSomeText {
@Test
public void testMatchesAllLines() {
assertThat("foo\nbar", MultilineTextMatcher.matchesAllLines("foo", "bar"));
}
}
```
## Features
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)
## Information for Developers
* [Developer Guide](doc/developer_guide/developer_guide.md)
## Dependencies
## Runtime Dependencies
The Hamcrest Multiline Text Matcher requires Java 11 to run.
## Test Dependencies
### Test Dependencies
| Dependency | Purpose | License |
|-------------------------------------------------------------------------------------|--------------------------------------------------------|----------------------------------|
| [Apache Maven](https://maven.apache.org/) | Build tool | Apache License 2.0 |
| [Java Hamcrest](http://hamcrest.org/JavaHamcrest/) | Checking for conditions in code via matchers | BSD License |
| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 |
### Maven Plug-ins
| Plug-in | Purpose | License |
|-------------------------------------------------------------------------------------|--------------------------------------------------------|----------------------------------|
| [License Maven Plugin](https://www.mojohaus.org/license-maven-plugin/) | Adding license information to source files | LGPL3 |
| [Maven Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-plugin/) | Setting required Java version | Apache License 2.0 |
| [Maven Enforcer Plugin](http://maven.apache.org/enforcer/maven-enforcer-plugin/) | Controlling environment constants | Apache License 2.0 |
| [Maven Failsafe Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/) | Integration testing | Apache License 2.0 |
| [Maven Jacoco Plugin](https://www.eclemma.org/jacoco/trunk/doc/maven.html) | Code coverage metering | Eclipse Public License 2.0 |
| [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin) | Create JAR archive with Javadoc | Apache License 2.0 |
| [Maven Source Plugin](http://maven.apache.org/plugins/maven-source-plugin/) | Create JAR archive with source code | Apache License 2.0 |
| [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/) | Unit testing | Apache License 2.0 |
| [OSS Index Maven Plugin](https://sonatype.github.io/ossindex-maven/maven-plugin/) | Checking Dependencies Vulnerability | ASL2 |
| [Versions Maven Plugin](https://www.mojohaus.org/versions-maven-plugin/) | Checking if dependencies updates are available | Apache License 2.0 |