org.progeeks.junit
Class DefaultTestContext
java.lang.Object
org.progeeks.util.beans.BeanChangeSupport
org.progeeks.util.beans.PropertyHolder
org.progeeks.junit.DefaultTestContext
- All Implemented Interfaces:
- java.io.Serializable, TestContext, StandardBean
public class DefaultTestContext
- extends PropertyHolder
- implements TestContext
Default implementation of the TestContext interface. When used with a
DefaultTestFixture
, can be used to access stored
org.progeeks.tools.gen.DataGenerator
s to create data to feed to objects under test, or
the objects to test themselves.
- Version:
- $Revision: 1.7 $
- Author:
- Paul Wisneskey, Eric Sword
- See Also:
- Serialized Form
Methods inherited from class org.progeeks.util.beans.PropertyHolder |
getBooleanProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getObjectProperty, getStringProperty, setBooleanProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setStringProperty |
Methods inherited from class org.progeeks.util.beans.BeanChangeSupport |
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hasListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_TEST_FIXTURE
public static final java.lang.String PROP_TEST_FIXTURE
- See Also:
- Constant Field Values
PROP_DESCRIPTION
public static final java.lang.String PROP_DESCRIPTION
- See Also:
- Constant Field Values
DefaultTestContext
public DefaultTestContext()
getGenerator
public DataGenerator getGenerator(java.lang.String key)
- Returns the dataGenerator in the fixture map for the given key.
getGeneratorForClass
public DataGenerator getGeneratorForClass(java.lang.String className)
- Returns the first generator that produces the given Java class or MetaClass
- Parameters:
className
-
getTestFixture
public TestFixture getTestFixture()
- Description copied from interface:
TestContext
- Returns the test fixture that can be used to set up and tear down this
context.
- Specified by:
getTestFixture
in interface TestContext
setTestFixture
public void setTestFixture(TestFixture testFixture)
- Description copied from interface:
TestContext
- Set the test fixture for setting up and tearing down this context.
- Specified by:
setTestFixture
in interface TestContext
getDescription
public java.lang.String getDescription()
- Description copied from interface:
TestContext
- Brief description of the key traits of this context. Used by
ContextualTestCase
when showing where an error occurred.
- Specified by:
getDescription
in interface TestContext
- Returns:
- Returns the description string. If no description was set, returns the
empty string.
setDescription
public void setDescription(java.lang.String desc)
- Specified by:
setDescription
in interface TestContext
- Parameters:
desc
- The desc to set.
Copyright © 2002-2003 Paul Speed. All Rights Reserved.