org.bibalex.daf.handlers.xmlhandler
Class XmlHandlerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.bibalex.daf.handlers.xmlhandler.XmlHandlerTest
All Implemented Interfaces:
junit.framework.Test

public class XmlHandlerTest
extends junit.framework.TestCase

Test for XmlHandler. The test case assumes that the file "TestResourceFile.xml" at the working dir contains:

Author:
Shehab.Kamal

Constructor Summary
XmlHandlerTest()
           
 
Method Summary
private  org.w3c.dom.Node getChildByName(org.w3c.dom.Node parent, java.lang.String targetName)
          Get the child node that has the given name attribute.
 void testEncode()
           
 void testGetNode()
           
 
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

XmlHandlerTest

public XmlHandlerTest()
Method Detail

testGetNode

public void testGetNode()
                 throws java.lang.Exception
Throws:
java.lang.Exception

getChildByName

private org.w3c.dom.Node getChildByName(org.w3c.dom.Node parent,
                                        java.lang.String targetName)
Get the child node that has the given name attribute.

Parameters:
parent - the parnet Node to search in its children.
targetName - The name of the child.
Returns:
The child node that has the given name, or null if not found.

testEncode

public void testEncode()