UTF-X, Unit Testing Framework - Xslt

utfx.framework
Class XSLTTestFileSuite

java.lang.Object
  extended by junit.framework.TestSuite
      extended by utfx.framework.XSLTTestFileSuite
All Implemented Interfaces:
junit.framework.Test

public class XSLTTestFileSuite
extends junit.framework.TestSuite

Suite of tests for XSLT stylesheets. This class represents a test suite of UTF-X tests defined in a single definition file.

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

Version:
$Revision: 1.4.2.1 $ $Date: 2006/08/11 14:23:57 $ $Name: release_0_0_8_alpha $
Author:
Jacek Radajewski, Oliver Lucido, Sally MacFarlane

Field Summary
private  SourceParser defaultSourceBuilder
          default source builder for this test suite
private  java.lang.String expectedPublicId
           
private  java.lang.String expectedSystemId
           
private  java.io.File file
          utf-x test definition file
private static org.apache.log4j.Logger log
          logger
private  java.lang.String sourcePublicId
           
private  java.lang.String sourceSystemId
           
 
Constructor Summary
XSLTTestFileSuite(java.lang.String testFilename)
          Constructs an XSLT test suite with a specified name.
 
Method Summary
 boolean doExpectedValidation()
           
 boolean doSourceValidation()
           
 SourceParser getDefaultSourceBuilder()
           
 java.lang.String getExpectedPublicId()
           
 java.lang.String getExpectedSystemId()
           
 java.lang.String getSourcePublicId()
           
 java.lang.String getSourceSystemId()
           
 void setDefaultSourceBuilder(SourceParser defaultSourceBuilder)
          Set default SourceParser to be used by this file TestSuite.
 void setExpectedPublicId(java.lang.String expectedPublicId)
           
 void setExpectedSystemId(java.lang.String expectedSystemId)
           
 void setSourcePublicId(java.lang.String sourcePublicId)
           
 void setSourceSystemId(java.lang.String sourceSystemId)
           
static junit.framework.TestSuite suite(java.lang.String testFilename)
          Parses an XML test definition document and creates a TestSuite.
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourcePublicId

private java.lang.String sourcePublicId

sourceSystemId

private java.lang.String sourceSystemId

expectedPublicId

private java.lang.String expectedPublicId

expectedSystemId

private java.lang.String expectedSystemId

log

private static org.apache.log4j.Logger log
logger


file

private java.io.File file
utf-x test definition file


defaultSourceBuilder

private SourceParser defaultSourceBuilder
default source builder for this test suite

Constructor Detail

XSLTTestFileSuite

public XSLTTestFileSuite(java.lang.String testFilename)
Constructs an XSLT test suite with a specified name.

Parameters:
dirName - where to look for the tests. doubles as the name of this test suite.
Method Detail

doSourceValidation

public boolean doSourceValidation()
Returns:
true iff source validation was specified for the test definition file represented by this object.

doExpectedValidation

public boolean doExpectedValidation()
Returns:
true iff source validation was specified for the test definition file represented by this object.

getExpectedPublicId

public java.lang.String getExpectedPublicId()
Returns:
Returns the expectedPublicId.

setExpectedPublicId

public void setExpectedPublicId(java.lang.String expectedPublicId)
Parameters:
expectedPublicId - The expectedPublicId to set.

getExpectedSystemId

public java.lang.String getExpectedSystemId()
Returns:
Returns the expectedSystemId.

setExpectedSystemId

public void setExpectedSystemId(java.lang.String expectedSystemId)
Parameters:
expectedSystemId - The expectedSystemId to set.

getSourcePublicId

public java.lang.String getSourcePublicId()
Returns:
Returns the sourcePublicId.

setSourcePublicId

public void setSourcePublicId(java.lang.String sourcePublicId)
Parameters:
sourcePublicId - The sourcePublicId to set.

getSourceSystemId

public java.lang.String getSourceSystemId()
Returns:
Returns the sourceSystemId.

setSourceSystemId

public void setSourceSystemId(java.lang.String sourceSystemId)
Parameters:
sourceSystemId - The sourceSystemId to set.

suite

public static junit.framework.TestSuite suite(java.lang.String testFilename)
Parses an XML test definition document and creates a TestSuite.

Parameters:
testFilename - the UTF-X test definition file.
Returns:
a TestSuite for the test definition

setDefaultSourceBuilder

public void setDefaultSourceBuilder(SourceParser defaultSourceBuilder)
Set default SourceParser to be used by this file TestSuite.

Parameters:
defaultSourceBuilder -

getDefaultSourceBuilder

public SourceParser getDefaultSourceBuilder()
Returns:
current default SourceParser.

UTF-X, Unit Testing Framework - Xslt