gov.nih.nci.cagrid.testing.system.haste
Class Story

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by gov.nih.nci.cagrid.testing.system.haste.Story
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ServiceStoryBase, ServiceValidationStory

public abstract class Story
extends junit.framework.TestCase

A Story executes an ordered sequence of Steps. Story is the system-test-level analogue of JUnit's TestCase.

Version:
$Revision: 1.1 $

Constructor Summary
Story()
          Construct a new Story by sequencing the executable tests
 
Method Summary
abstract  java.lang.String getDescription()
          This method is for the user to give a short description of this story.
 java.lang.String getStepName()
           
 void runBare()
          Runs the bare test sequence.
protected  void runTest()
          Override runTest() to use steps instead of reflection-targeted methods.
 void setStepName(java.lang.String name)
          Sets the name of the current step.
protected  void setUp()
           
protected abstract  java.util.Vector steps()
          Subclasses implement this method to compose a List of Steps to be executed in order when this Story is run.
protected  boolean storySetUp()
           
protected  void storyTearDown()
           
protected  void tearDown()
           
 void testDummy()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, setName, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Story

public Story()
Construct a new Story by sequencing the executable tests

Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

setStepName

public void setStepName(java.lang.String name)
Sets the name of the current step.


getStepName

public java.lang.String getStepName()

steps

protected abstract java.util.Vector steps()
Subclasses implement this method to compose a List of Steps to be executed in order when this Story is run.

Example:

 List mySteps = new ArrayList();
 mySteps.add(new Step1());
 mySteps.add(new Step2());
 mySteps.add(new Step3());
 return mySteps;
 

Note that a Story contains only Steps, never other Stories. To create a composite Story, use StoryBook.


getDescription

public abstract java.lang.String getDescription()
This method is for the user to give a short description of this story. This allows for the creation of another tool to track which stories are implemented


runBare

public void runBare()
             throws java.lang.Throwable
Runs the bare test sequence.

Overrides:
runBare in class junit.framework.TestCase
Throws:
java.lang.Throwable - if any exception is thrown

runTest

protected void runTest()
                throws java.lang.Throwable
Override runTest() to use steps instead of reflection-targeted methods.

Overrides:
runTest in class junit.framework.TestCase
Throws:
java.lang.Throwable

testDummy

public void testDummy()
               throws java.lang.Throwable
Throws:
java.lang.Throwable

storySetUp

protected boolean storySetUp()
                      throws java.lang.Throwable
Throws:
java.lang.Throwable

storyTearDown

protected void storyTearDown()
                      throws java.lang.Throwable
Throws:
java.lang.Throwable