org.ucl.xpathtest
Class TSTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.ucl.xpathtest.TSTest
All Implemented Interfaces:
InputChecker, junit.framework.Test

public class TSTest
extends junit.framework.TestCase
implements InputChecker

TSTest class inherits from TestCase and implements the InputChecker interface. Static final String variable TS_TESTDATA declared to store location of .txt file


Field Summary
static java.lang.String TS_TESTDATA
           
 
Constructor Summary
TSTest()
           
 
Method Summary
 void check_input(java.lang.String expr, java.lang.String expected, java.lang.String err)
          check_input checks whether xpath expr evaluates to the expected result and handles any errors
static java.lang.String get_ts_xp(int nodes)
          get_ts_xp does various calculations and iterations to get token size from graph rep.
 void load_xml(java.lang.String fname)
          Empty method to be overloaded by subclasses
 void setUp()
          Instantiates instance variables with data from libraries
 void testInputs()
          Initiates testing for this class
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

TS_TESTDATA

public static final java.lang.String TS_TESTDATA
See Also:
Constant Field Values
Constructor Detail

TSTest

public TSTest()
Method Detail

load_xml

public void load_xml(java.lang.String fname)
Empty method to be overloaded by subclasses

Specified by:
load_xml in interface InputChecker

setUp

public void setUp()
Instantiates instance variables with data from libraries


get_ts_xp

public static java.lang.String get_ts_xp(int nodes)
get_ts_xp does various calculations and iterations to get token size from graph rep.

Parameters:
nodes - number of nodes are passed in
Returns:
token size of xpath expression is returned as a String type.

check_input

public void check_input(java.lang.String expr,
                        java.lang.String expected,
                        java.lang.String err)
check_input checks whether xpath expr evaluates to the expected result and handles any errors

Specified by:
check_input in interface InputChecker
Parameters:
expr - expression to be checked
expected - the expected result of expr
err - errors passed in. If there are errors in the input it is handled accordingly.

testInputs

public void testInputs()
Initiates testing for this class