|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
junit.extensions.TestSetup
com.ibm.xtools.patterns.framework.test.AbstractTestSetup
This is the base class for all pattern test setup classes. This class will create a test project with a UML model in the runtime workspace. It will create a package in a class model, and create an instance of the pattern to be tested in the package. The "target" for the instance varies according to the PatternInstanceTargetCreationStrategy employed. The default implementation in this class creates the instance using the created package as the target. All setup classes that extend this class must provide the following information by implementing their corresponding abstract methods: Test Project Name: The name of the Eclipse project used to run the tests. This setup class requires that a modelling project with this name exists in the location of the test plug-in. This project will be copied to the runtime workspace location during setup. Test Target Java Project name: The name of the project where Java classes will be generated to. Test Model Name: Name of the model used to run the tests. Test Case: The test case that this class sets up for. If setup classes that extend this class want to create a pattern instance using something other than a package as a target, the classes should override getPatternInstanceTargetCreationStrategy with the strategy of their choice. Implementations of PatternInstanceTargetCreationStrategies can be found in: com.ibm.xtools.patterns.framework.test.strategies
Nested Class Summary | |
protected class |
AbstractTestSetup.TestPreferences
|
Field Summary |
Fields inherited from class junit.extensions.TestDecorator |
fTest |
Constructor Summary | |
AbstractTestSetup(junit.framework.Test a_test,
ITestDataFactory a_dataFactory,
AbstractTestUtil testUtil)
|
Method Summary | |
void |
cleanTargetJavaProject()
Removes the test package contained in the test Java project. |
static EObject |
getFirstRoot(Resource resource)
Gets the first root object in the resource. |
AbstractPatternInstance |
getPatternInstance()
|
com.ibm.xtools.patterns.framework.test.strategies.PatternInstanceTargetCreationStrategy |
getPatternInstanceTargetCreationStrategy()
Set the class that is used to make the target for the pattern instance |
IParameterDescriptor[] |
getPatternParameters()
|
protected abstract AbstractTestCase |
getTestCase()
|
TestDataManager |
getTestDataManager()
|
protected abstract String |
getTestModelName()
|
Package |
getTestPackage()
|
AbstractTestSetup.TestPreferences |
getTestPreferences()
|
protected abstract String |
getTestProjectName()
|
org.eclipse.jdt.core.IJavaProject |
getTestTargetJavaProject()
|
protected abstract String |
getTestTargetJavaProjectName()
|
Model |
getUML2Model()
|
protected void |
setUp()
Sets up the fixture. |
protected void |
tearDown()
Tears down the fixture. |
Methods inherited from class junit.extensions.TestSetup |
run |
Methods inherited from class junit.extensions.TestDecorator |
basicRun, countTestCases, getTest, 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 |
Constructor Detail |
public AbstractTestSetup(junit.framework.Test a_test, ITestDataFactory a_dataFactory, AbstractTestUtil testUtil)
Method Detail |
public void cleanTargetJavaProject()
public AbstractPatternInstance getPatternInstance()
protected abstract AbstractTestCase getTestCase()
protected abstract String getTestModelName()
public Package getTestPackage()
protected abstract String getTestProjectName()
public org.eclipse.jdt.core.IJavaProject getTestTargetJavaProject()
protected abstract String getTestTargetJavaProjectName()
public Model getUML2Model()
public com.ibm.xtools.patterns.framework.test.strategies.PatternInstanceTargetCreationStrategy getPatternInstanceTargetCreationStrategy()
public static EObject getFirstRoot(Resource resource)
resource
- The resource.
protected void setUp() throws Exception
junit.extensions.TestSetup
Exception
TestCase.setUp()
protected void tearDown() throws Exception
junit.extensions.TestSetup
Exception
TestCase.tearDown()
public TestDataManager getTestDataManager()
public IParameterDescriptor[] getPatternParameters()
public AbstractTestSetup.TestPreferences getTestPreferences()
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.