UTF-X, Unit Testing Framework - Xslt

utfx.framework
Class StringComparisonFailure

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by junit.framework.AssertionFailedError
              extended by junit.framework.ComparisonFailure
                  extended by utfx.framework.StringComparisonFailure
All Implemented Interfaces:
java.io.Serializable

public class StringComparisonFailure
extends junit.framework.ComparisonFailure

String comparison failure. This class extends the JUnit Comparisonailure so that when UTF-X tests are executed directly within JUnit framework then test failures can still be shown in a meaningful way.

Copyright © 2004 - University of Southern Queensland.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

$Source: /cvs/utf-x/framework/src/java/utfx/framework/StringComparisonFailure.java,v $

Version:
$Revision: 1.2 $ $Date: 2005/03/14 05:54:02 $ $Name: release_0_0_8_alpha $
Author:
Jacek Radajewski
See Also:
Serialized Form

Field Summary
private  java.lang.String diffActual
           
private  java.lang.String diffExpected
           
private  java.lang.String failureMessage
          failure message
private  java.lang.String sameContent
          the starting part of the XML content that is the same between expected and actual
private static long serialVersionUID
          Comment for serialVersionUID
 
Constructor Summary
StringComparisonFailure(java.lang.String message, java.lang.String expected, java.lang.String actual)
          Create a new StringComparisonFailure.
 
Method Summary
 java.lang.String getDiffActual()
           
 java.lang.String getDiffExpected()
           
 java.lang.String getMessage()
           
 java.lang.String getSameContent()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Comment for serialVersionUID

See Also:
Constant Field Values

failureMessage

private java.lang.String failureMessage
failure message


sameContent

private java.lang.String sameContent
the starting part of the XML content that is the same between expected and actual


diffExpected

private java.lang.String diffExpected

diffActual

private java.lang.String diffActual
Constructor Detail

StringComparisonFailure

public StringComparisonFailure(java.lang.String message,
                               java.lang.String expected,
                               java.lang.String actual)
Create a new StringComparisonFailure.

Parameters:
message -
expected -
actual -
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class junit.framework.ComparisonFailure
Returns:
feilureMessage

getDiffActual

public java.lang.String getDiffActual()
Returns:
Returns the diffActual.

getDiffExpected

public java.lang.String getDiffExpected()
Returns:
Returns the diffExpected.

getSameContent

public java.lang.String getSameContent()
Returns:
Returns the sameContent.

UTF-X, Unit Testing Framework - Xslt