Class ShouldHaveSameContent

All Implemented Interfaces:
ErrorMessageFactory

public class ShouldHaveSameContent extends AbstractShouldHaveTextContent
Creates an error message indicating that an assertion that verifies that two files/inputStreams/paths have same content failed.
Author:
Yvonne Wang, Matthieu Baechler, Joel Costigliola
  • Method Details

    • shouldHaveSameContent

      public static ErrorMessageFactory shouldHaveSameContent(File actual, File expected, List<Delta<String>> diffs)
      Creates a new ShouldHaveSameContent.
      Parameters:
      actual - the actual file in the failed assertion.
      expected - the expected file in the failed assertion.
      diffs - the differences between actual and expected.
      Returns:
      the created ErrorMessageFactory.
    • shouldHaveSameContent

      public static ErrorMessageFactory shouldHaveSameContent(InputStream actual, InputStream expected, List<Delta<String>> diffs)
      Creates a new ShouldHaveSameContent.
      Parameters:
      actual - the actual InputStream in the failed assertion.
      expected - the expected InputStream in the failed assertion.
      diffs - the differences between actual and expected.
      Returns:
      the created ErrorMessageFactory.
    • shouldHaveSameContent

      public static ErrorMessageFactory shouldHaveSameContent(InputStream actual, String expected, List<Delta<String>> diffs)
      Creates a new ShouldHaveSameContent.
      Parameters:
      actual - the actual InputStream in the failed assertion.
      expected - the expected String in the failed assertion.
      diffs - the differences between actual and expected.
      Returns:
      the created ErrorMessageFactory.
    • shouldHaveSameContent

      public static ErrorMessageFactory shouldHaveSameContent(Path actual, Path expected, List<Delta<String>> diffs)
      Creates a new ShouldHaveSameContent.
      Parameters:
      actual - the actual Path in the failed assertion.
      expected - the expected Path in the failed assertion.
      diffs - the differences between actual and expected.
      Returns:
      the created ErrorMessageFactory.