Class FileComparator


  • public class FileComparator
    extends Object
    Utility class to compare two files.
    Author:
    Christophe Labouisse
    • Constructor Detail

      • FileComparator

        public FileComparator​(File source,
                              File dest)
        Creates a new file comparator.
        Parameters:
        source - File
        dest - File
    • Method Detail

      • assertSizesMatch

        public final void assertSizesMatch()
        Asserts that both files have the same length.
      • assertLinesMatch

        public final void assertLinesMatch()
                                    throws IOException
        Asserts that both files match line for line. This method also assert the both files have the same length.
        Throws:
        IOException - if FileReader fails