UTF-X, Unit Testing Framework - Xslt

utfx.framework
Class UTFXTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by utfx.framework.UTFXTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
BadTDFTestCase, BadXSLTTestCase, XSLTTransformTestCase

public class UTFXTestCase
extends junit.framework.TestCase

UTF-X test case extends junit test case and adds functionality required for testing XSLT stylesheets and the UTF-X framework itself.

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/UTFXTestCase.java,v $

Version:
$Revision: 1.3 $ $Date: 2005/03/18 05:07:08 $ $Name: release_0_0_8_alpha $
Author:
Jacek Radajewski, Oliver (Lulu) Lucido

Constructor Summary
UTFXTestCase(java.lang.String name)
           
 
Method Summary
 void assertEquals(byte[] b1, byte[] b2)
          Asserts that the two specified byte arrays are equal.
 void assertEquals(java.io.InputStream expected, java.io.InputStream actual)
          Asserts that two input streams are byte equivalent.
 void assertEquals(java.lang.String message, byte[] b1, byte[] b2)
          Asserts that the two specified byte arrays are equal.
 void assertEquals(java.lang.String message, java.io.InputStream expected, java.io.InputStream actual)
          Asserts that two input streams are byte equivalent.
 void assertEquivXML(java.io.InputStream expected, java.io.InputStream actual)
          Asserts that two XML input streams are equivalent, which means their canonical forms are equal, when transformed using utfx.util.CanonicalForm.
 void assertEquivXML(java.lang.String message, java.io.InputStream expected, java.io.InputStream actual)
          Asserts that two XML input streams are equivalent, which means their canonical forms are equal, when transformed using utfx.util.CanonicalForm.
 void assertEquivXML(java.lang.String expected, java.lang.String actual)
          Convenience method for comparing two XML strings.
 void assertEquivXML(java.lang.String message, java.lang.String expected, java.lang.String actual)
          Convenience method for comparing two XML strings.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UTFXTestCase

public UTFXTestCase(java.lang.String name)
Parameters:
name -
Method Detail

assertEquals

public void assertEquals(java.lang.String message,
                         byte[] b1,
                         byte[] b2)
                  throws java.lang.Exception
Asserts that the two specified byte arrays are equal.

Parameters:
message - failed message
b1 - expected bytes
b2 - actual bytes
Throws:
java.lang.Exception

assertEquals

public void assertEquals(byte[] b1,
                         byte[] b2)
                  throws java.lang.Exception
Asserts that the two specified byte arrays are equal.

Parameters:
b1 - expected bytes
b2 - actual bytes
Throws:
java.lang.Exception

assertEquals

public void assertEquals(java.lang.String message,
                         java.io.InputStream expected,
                         java.io.InputStream actual)
                  throws java.lang.Exception
Asserts that two input streams are byte equivalent.

Parameters:
failed - message
expected - the expected XML input stream
actual - the actual XML input stream
Throws:
java.lang.Exception

assertEquals

public void assertEquals(java.io.InputStream expected,
                         java.io.InputStream actual)
                  throws java.lang.Exception
Asserts that two input streams are byte equivalent.

Parameters:
expected - the expected XML input stream
actual - the actual XML input stream
Throws:
java.lang.Exception

assertEquivXML

public void assertEquivXML(java.lang.String message,
                           java.io.InputStream expected,
                           java.io.InputStream actual)
                    throws java.lang.Exception
Asserts that two XML input streams are equivalent, which means their canonical forms are equal, when transformed using utfx.util.CanonicalForm. If they are not an StringComparisonFailure is thrown with the given message.

Parameters:
message - the message thrown with the AssertionFailedError
expected - the expected XML input stream
actual - the actual XML input stream
Throws:
StringComparisonFailure
java.lang.Exception

assertEquivXML

public void assertEquivXML(java.io.InputStream expected,
                           java.io.InputStream actual)
                    throws java.lang.Exception
Asserts that two XML input streams are equivalent, which means their canonical forms are equal, when transformed using utfx.util.CanonicalForm. If they are not an StringComparisonFailure is thrown with the given message.

Parameters:
expected - the expected XML input stream
actual - the actual XML input stream
Throws:
StringComparisonFailure
java.lang.Exception

assertEquivXML

public void assertEquivXML(java.lang.String message,
                           java.lang.String expected,
                           java.lang.String actual)
                    throws java.lang.Exception
Convenience method for comparing two XML strings. Basically a wrapper for assertEquivXML with the default message "The XML specified are not equivalent"

Parameters:
message - failed message
expected -
actual -
Throws:
java.lang.Exception
See Also:
Assert

assertEquivXML

public void assertEquivXML(java.lang.String expected,
                           java.lang.String actual)
                    throws java.lang.Exception
Convenience method for comparing two XML strings. Basically a wrapper for assertEquivXML with the default message "The XML specified are not equivalent"

Parameters:
expected -
actual -
Throws:
java.lang.Exception
See Also:
Assert

UTF-X, Unit Testing Framework - Xslt