Ejemplo n.º 1
0
  /**
   * Formats the assertion failed message for the given difference.
   *
   * @param schemaDifference The difference, not null
   * @return The message, not null
   */
  protected String generateErrorMessage(SchemaDifference schemaDifference) {
    StringBuilder result =
        new StringBuilder(
            "Assertion failed. Differences found between the expected data set and actual database content.");

    String schemaName = schemaDifference.getSchema().getName();
    appendMissingTableDifferences(schemaDifference, result);
    appendTableDifferences(schemaDifference, result);
    result.append("\n\nActual database content:\n\n");
    appendSchemaContent(schemaDifference.getSchema(), schemaDifference.getActualSchema(), result);
    return result.toString();
  }