consciouscode.seedling.junit
Class SeedlingTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by consciouscode.junit.TestCase
              extended by consciouscode.seedling.junit.SeedlingTestCase
All Implemented Interfaces:
SeedlingTest, junit.framework.Test
Direct Known Subclasses:
StandaloneSeedlingTestCase

public abstract class SeedlingTestCase
extends TestCase
implements SeedlingTest

Base class for TestCases that make use of a Seedling. It is assumed that setGlobalRoot(consciouscode.seedling.RootNode) is called before the test is run. This is generally handled by a SeedlingTestRunner.

See Also:
TestCase, TestCase

Field Summary
protected  ConfigLoaderSequence myConfigLoaderSequence
           
protected  PropertiesConfigEvaluator myDefaultEvaluator
           
protected  RootNode myGlobalRoot
           
protected  StandardBranch myScratchBranch
           
 
Fields inherited from class consciouscode.junit.TestCase
AUTO_SUITES
 
Constructor Summary
SeedlingTestCase()
           
 
Method Summary
 ConfigLoaderSequence configLoaderSequence()
           
protected  PropertiesConfigEvaluator defaultEvaluator()
           
 RootNode getGlobalRoot()
           
 StandardBranch getScratchBranch()
          Provides a StandardBranch for testing.
 Object globalInstalledPath(String globalPath)
           
 Object globalRequiredPath(String globalPath)
           
 void setGlobalRoot(RootNode root)
          Set the global root of the Seedling that is to be tested.
 void tearDown()
           
 
Methods inherited from class consciouscode.junit.TestCase
assertContained, assertEqualContents, assertEqualContents, assertEqualElements, assertEqualElements, assertEqualMembers, assertEquals, assertNotContained, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertPropertyEquals, assertPropertyEquals, assertPropertyEquals, fail, fail, getProperty, loadTestPropertiesFile, projectFile, setProperty, setProperty, setProperty
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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 junit.framework.Test
countTestCases, run
 

Field Detail

myDefaultEvaluator

protected PropertiesConfigEvaluator myDefaultEvaluator

myConfigLoaderSequence

protected ConfigLoaderSequence myConfigLoaderSequence

myGlobalRoot

protected RootNode myGlobalRoot

myScratchBranch

protected StandardBranch myScratchBranch
Constructor Detail

SeedlingTestCase

public SeedlingTestCase()
Method Detail

defaultEvaluator

protected PropertiesConfigEvaluator defaultEvaluator()

configLoaderSequence

public ConfigLoaderSequence configLoaderSequence()

getGlobalRoot

public RootNode getGlobalRoot()

setGlobalRoot

public void setGlobalRoot(RootNode root)
Description copied from interface: SeedlingTest
Set the global root of the Seedling that is to be tested. This method is invoked (by SeedlingTestRunner) before the test is run.

Specified by:
setGlobalRoot in interface SeedlingTest

getScratchBranch

public StandardBranch getScratchBranch()
Provides a StandardBranch for testing. The same instance is returned on each call (to this object).

Returns:
not null.

globalRequiredPath

public Object globalRequiredPath(String globalPath)
                          throws NoSuchNodeException,
                                 NodeProvisioningException
Throws:
NoSuchNodeException
NodeProvisioningException

globalInstalledPath

public Object globalInstalledPath(String globalPath)

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception


Copyright © 2001–2012 Todd V. Jonker. All Rights Reserved.