Class DbComparisonFailure

All Implemented Interfaces:
Serializable

public class DbComparisonFailure extends AssertionError
Exception signaling a DbUnit assertion failure while comparing values. Is used to avoid the direct dependency to any other testing framework.
Since:
2.4.0
Version:
$Revision$ $Date$
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
See Also:
  • Constructor Details

    • DbComparisonFailure

      public DbComparisonFailure(String reason, String expected, String actual)
      Parameters:
      reason - The reason for the comparison failure
      expected - The expected value
      actual - The actual value
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getReason

      public String getReason()
    • getExpected

      public String getExpected()
    • getActual

      public String getActual()
    • toString

      public String toString()
      Overrides:
      toString in class Throwable
    • buildMessage

      public static final String buildMessage(String reason, String expected, String actual)
      Creates a formatted message string from the given parameters
      Parameters:
      reason - The reason for an assertion or comparison failure
      expected - The expected result
      actual - The actual result
      Returns:
      The formatted message