Class PatchChecks

java.lang.Object
de.chojo.sadu.testing.PatchChecks

public class PatchChecks extends Object
The PatchChecks class provides methods for checking the presence of patch files for the databases.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    checkFiles(int baseVersion, Database<?,?>... databases)
    Checks if files in the given databases match the specified base version.
    static void
    checkFiles(int baseVersion, String currentVersion, Database<?,?>... databases)
    Checks if the files for the given databases need to be updated based on the base version and current version.
    static void
    checkFiles(int baseVersion, String currentVersion, String... databases)
    Check the consistency of files in the given databases against a reference set of files.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • checkFiles

      public static void checkFiles(int baseVersion, Database<?,?>... databases) throws IOException
      Checks if files in the given databases match the specified base version. Compares the file content of each database against the base version and throws an IOException if any mismatch is found.
      Parameters:
      baseVersion - The lowest major version of the databases.
      databases - The databases to check.
      Throws:
      IOException - If there is a mismatch between the file content in any of the databases and the base version.
    • checkFiles

      @Internal public static void checkFiles(int baseVersion, String currentVersion, Database<?,?>... databases) throws IOException
      Checks if the files for the given databases need to be updated based on the base version and current version.
      Parameters:
      baseVersion - the base version of the databases
      currentVersion - the current version of the databases
      databases - the databases to check
      Throws:
      IOException - if an I/O error occurs while checking the files
    • checkFiles

      @Internal public static void checkFiles(int baseVersion, String currentVersion, String... databases) throws IOException
      Check the consistency of files in the given databases against a reference set of files.
      Parameters:
      baseVersion - The base version of the database.
      currentVersion - The current version of the database.
      databases - The names of the databases to check.
      Throws:
      IOException - If an I/O error occurs while accessing the files.
      org.opentest4j.AssertionFailedError - If there are missing or unreachable files in the databases.