Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldHaveSameContent

extends AbstractShouldHaveTextContent
Class Inheritance
Imports
java.io.File, .InputStream, java.nio.file.Path, java.util.List, org.assertj.core.util.diff.Delta

Creates an error message indicating that an assertion that verifies that two files/inputStreams/paths have same content failed.
Authors
Yvonne Wang, Matthieu Baechler, Joel Costigliola

Field Summary

Inherited from org.assertj.core.error.AbstractShouldHaveTextContent:
diffs

Constructor Summary

AccessConstructor and Description
private
ShouldHaveSameContent(File actual, File expected, String diffs)

private
private
private
ShouldHaveSameContent(Path actual, Path expected, String diffs)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSameContent
(File
the actual file in the failed assertion.
actual
,
File
the expected file in the failed assertion.
expected
,
List<Delta<String>>
the differences between actual and expected.
diffs
)

Creates a new ShouldHaveSameContent.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSameContent
(InputStream
the actual InputStream in the failed assertion.
actual
,
InputStream
the expected InputStream in the failed assertion.
expected
,
List<Delta<String>>
the differences between actual and expected.
diffs
)

Creates a new ShouldHaveSameContent.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSameContent
(InputStream
the actual InputStream in the failed assertion.
actual
,
String
the expected String in the failed assertion.
expected
,
List<Delta<String>>
the differences between actual and expected.
diffs
)

Creates a new ShouldHaveSameContent.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSameContent
(Path
the actual Path in the failed assertion.
actual
,
Path
the expected Path in the failed assertion.
expected
,
List<Delta<String>>
the differences between actual and expected.
diffs
)

Creates a new ShouldHaveSameContent.

Inherited from org.assertj.core.error.AbstractShouldHaveTextContent:
creatediffsAsString

Constructor Detail

ShouldHaveSameContentback to summary
private ShouldHaveSameContent(File actual, File expected, String diffs)
ShouldHaveSameContentback to summary
private ShouldHaveSameContent(InputStream actual, InputStream expected, String diffs)
ShouldHaveSameContentback to summary
private ShouldHaveSameContent(InputStream actual, String expected, String diffs)
ShouldHaveSameContentback to summary
private ShouldHaveSameContent(Path actual, Path expected, String diffs)

Method Detail

shouldHaveSameContentback to summary
public static ErrorMessageFactory shouldHaveSameContent(File actual, File expected, List<Delta<String>> diffs)

Creates a new ShouldHaveSameContent.

Parameters
actual:File

the actual file in the failed assertion.

expected:File

the expected file in the failed assertion.

diffs:List<Delta<String>>

the differences between actual and expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSameContentback to summary
public static ErrorMessageFactory shouldHaveSameContent(InputStream actual, InputStream expected, List<Delta<String>> diffs)

Creates a new ShouldHaveSameContent.

Parameters
actual:InputStream

the actual InputStream in the failed assertion.

expected:InputStream

the expected InputStream in the failed assertion.

diffs:List<Delta<String>>

the differences between actual and expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSameContentback to summary
public static ErrorMessageFactory shouldHaveSameContent(InputStream actual, String expected, List<Delta<String>> diffs)

Creates a new ShouldHaveSameContent.

Parameters
actual:InputStream

the actual InputStream in the failed assertion.

expected:String

the expected String in the failed assertion.

diffs:List<Delta<String>>

the differences between actual and expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSameContentback to summary
public static ErrorMessageFactory shouldHaveSameContent(Path actual, Path expected, List<Delta<String>> diffs)

Creates a new ShouldHaveSameContent.

Parameters
actual:Path

the actual Path in the failed assertion.

expected:Path

the expected Path in the failed assertion.

diffs:List<Delta<String>>

the differences between actual and expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.