net.firstpartners.rp
Class BaseTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.firstpartners.rp.BaseTestCase
All Implemented Interfaces:
junit.framework.Test, IBaseCase
Direct Known Subclasses:
BasicCategoryStoreTests, KnowledgeManagerTests, PluginManagerTests

public abstract class BaseTestCase
extends junit.framework.TestCase
implements IBaseCase

Base test class. The base class will responsable for setting the context configuration. In case that a sub-test class need to use a specific application context, this must to return in getContextConfigLocation the context location to be used

Version:
1.1
Author:
Firstpartners.net

Field Summary
private  org.springframework.context.support.AbstractApplicationContext context
           
static java.lang.String DEFAULT_CONTEXT_CONFIG_LOCATION
           
private  java.lang.String runningContextDir
           
 
Constructor Summary
BaseTestCase()
           
 
Method Summary
 java.lang.String getContexDir()
          Get the current running context directory
 org.springframework.context.support.AbstractApplicationContext getContext()
          Get the a reference to the loaded context
 java.lang.String getContextConfigLocation()
          Method which must to be implmented by the subtests in case of use a specific application context file
protected  void setUp()
          Set-up the test case
 
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
 
Methods inherited from interface net.firstpartners.rp.IBaseCase
onSetup
 

Field Detail

DEFAULT_CONTEXT_CONFIG_LOCATION

public static final java.lang.String DEFAULT_CONTEXT_CONFIG_LOCATION
See Also:
Constant Field Values

context

private org.springframework.context.support.AbstractApplicationContext context

runningContextDir

private java.lang.String runningContextDir
Constructor Detail

BaseTestCase

public BaseTestCase()
Method Detail

setUp

protected final void setUp()
                    throws java.lang.Exception
Set-up the test case

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception - If an error occur

getContextConfigLocation

public java.lang.String getContextConfigLocation()
Method which must to be implmented by the subtests in case of use a specific application context file

Returns:

getContext

public org.springframework.context.support.AbstractApplicationContext getContext()
Get the a reference to the loaded context

Returns:

getContexDir

public java.lang.String getContexDir()
Get the current running context directory

Returns: