net.sf.antcontrib.cpptasks
Class TestXMLConsumer

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sf.antcontrib.cpptasks.TestXMLConsumer
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TestDependencyTable, TestTargetHistoryTable

public abstract class TestXMLConsumer
extends junit.framework.TestCase

Base class for tests on classes that consume or public XML documents.

Author:
Curt Arnold

Constructor Summary
protected TestXMLConsumer(java.lang.String testName)
           
 
Method Summary
static void copyResourceToTmpDir(java.lang.String resourceName, java.lang.String tmpFile)
          copies a resource to a temporary directory.
static void deleteTmpFile(java.lang.String tmpName)
          Deletes a file, if it exists, from the user's temporary directory.
 
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

TestXMLConsumer

protected TestXMLConsumer(java.lang.String testName)
Parameters:
testName -
Method Detail

copyResourceToTmpDir

public static final void copyResourceToTmpDir(java.lang.String resourceName,
                                              java.lang.String tmpFile)
                                       throws java.io.IOException
copies a resource to a temporary directory.

Parameters:
resourceName - resouce name, such as "files/openshore/history.xml".
tmpFile - name for temporary file created in /tmp or similar.
Throws:
java.io.IOException

deleteTmpFile

public static void deleteTmpFile(java.lang.String tmpName)
                          throws java.io.IOException
Deletes a file, if it exists, from the user's temporary directory.

Parameters:
tmpName - file name, may not be null
Throws:
java.io.IOException


Copyright © 2001-2008 Ant-Contrib Project. All Rights Reserved.