Skip to content

Hamcrest matcher that provides better diagnostics for multi-line mismatches.

License

Notifications You must be signed in to change notification settings

itsallcode/hamcrest-mutliline-text-matcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hamcrest-mutliline-text-matcher

This project provides a Hamcrest matcher that gives you better diagnostics for multi-line text in case of mismatches.

Build Maven Central Quality Gate Status Coverage

In a Nutshell

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

Dependencies

Runtime Dependencies

The Hamcrest Multiline Text Matcher requires Java 11 to run.

Test Dependencies

Test Dependencies

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

Maven Plug-ins

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