org.dbunit.assertion
Class DbComparisonFailure

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by java.lang.AssertionError
              extended by org.dbunit.assertion.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: 879 $ $Date: 2008-11-16 14:09:08 +0100 (Sun, 16 Nov 2008) $
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $
See Also:
Serialized Form

Constructor Summary
DbComparisonFailure(String reason, String expected, String actual)
           
 
Method Summary
static String buildMessage(String reason, String expected, String actual)
          Creates a formatted message string from the given parameters
 String getActual()
           
 String getExpected()
           
 String getMessage()
           
 String getReason()
           
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2002-2012. All Rights Reserved.