Package org.assertj.core.error
Class ShouldHaveContent
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.AbstractShouldHaveTextContent
-
- org.assertj.core.error.ShouldHaveContent
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ShouldHaveContent extends AbstractShouldHaveTextContent
Creates an error message indicating that an assertion that verifies that a file/path has a given text content failed.
-
-
Field Summary
-
Fields inherited from class org.assertj.core.error.AbstractShouldHaveTextContent
diffs
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description privateShouldHaveContent(java.io.File actual, java.nio.charset.Charset charset, java.lang.String diffs)privateShouldHaveContent(java.nio.file.Path actual, java.nio.charset.Charset charset, java.lang.String diffs)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactoryshouldHaveContent(java.io.File actual, java.nio.charset.Charset charset, java.util.List<Delta<java.lang.String>> diffs)Creates a new.ShouldHaveContentstatic ErrorMessageFactoryshouldHaveContent(java.nio.file.Path actual, java.nio.charset.Charset charset, java.util.List<Delta<java.lang.String>> diffs)Creates a new.ShouldHaveContent-
Methods inherited from class org.assertj.core.error.AbstractShouldHaveTextContent
create, diffsAsString
-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Method Detail
-
shouldHaveContent
public static ErrorMessageFactory shouldHaveContent(java.io.File actual, java.nio.charset.Charset charset, java.util.List<Delta<java.lang.String>> diffs)
Creates a new.ShouldHaveContent- Parameters:
actual- the actual file in the failed assertion.charset- the charset that was used to read the file.diffs- the differences betweenactualand the expected text that was provided in the assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldHaveContent
public static ErrorMessageFactory shouldHaveContent(java.nio.file.Path actual, java.nio.charset.Charset charset, java.util.List<Delta<java.lang.String>> diffs)
Creates a new.ShouldHaveContent- Parameters:
actual- the actual path in the failed assertion.charset- the charset that was used to read the path.diffs- the differences betweenactualand the expected text that was provided in the assertion.- Returns:
- the created
ErrorMessageFactory.
-
-