XBRLAPI

A Java API for XBRL


org.xbrlapi.utilities
Class BaseTestCase

java.lang.Object
  extended by org.xbrlapi.utilities.BaseTestCase
Direct Known Subclasses:
DOMLoadingTestCase

public abstract class BaseTestCase
extends Object

Provides a base test case for all tests in the XBRL API test suite. This package provides some base testcase classes that extend in useful ways on the JUnit base test case. Te XMLBase subclass helps with tests related to XML.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
protected  String baseURI
          Base URI for test data
protected  String cachePath
          Absolute path to the local document cache
protected  Properties configuration
           
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
BaseTestCase()
           
 
Method Summary
 void assessCustomEquality(Object object, Object copy)
          Tests if the object and the copy are equal and have the same hash code.
protected  Object getDeepCopy(Object object)
           
 URI getURI(String property)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

configuration

protected Properties configuration

cachePath

protected String cachePath
Absolute path to the local document cache


baseURI

protected String baseURI
Base URI for test data

Constructor Detail

BaseTestCase

public BaseTestCase()
Method Detail

setUp

protected void setUp()
              throws Exception
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Throws:
Exception

getURI

public URI getURI(String property)
Parameters:
property - determining the URI of the test data
Returns:
the absolute URI of the test data

getDeepCopy

protected Object getDeepCopy(Object object)
                      throws IOException,
                             ClassNotFoundException
Parameters:
object - The object to create a deep copy of.
Returns:
the deep copy of the object, obtained via serialization.
Throws:
IOException
ClassNotFoundException

assessCustomEquality

public final void assessCustomEquality(Object object,
                                       Object copy)
                                throws Exception
Tests if the object and the copy are equal and have the same hash code.

Parameters:
object - The object to use.
copy - The supposed deep copy of the object.
Throws:
Exception

Get Java XBRL API implementation at SourceForge.net.