org.eclipse.emf.test.tools.merger
Class JMergerTestSuite

java.lang.Object
  extended by junit.framework.TestSuite
      extended by org.eclipse.emf.test.tools.merger.JMergerTestSuite
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
JMergerCompareTestSuite

public class JMergerTestSuite
extends junit.framework.TestSuite

Runs JDOM JMergerJDOMTest or AST JMergerASTTest or both for each data directory /data/merge.input/<java version>/merge*.

Each test determines if it can be ran for each data directory.

See Also:
JMergerTest.DIRECTORY_NAMES_TO_JAVA_VERSIONS, JMergerJDOMTest.JMergerJDOMTest(TestSuite, File), JMergerASTTest.JMergerASTTest(TestSuite, File)

Nested Class Summary
protected static class JMergerTestSuite.JMergerDataDirectoryFilter
          Filter for the directories that will be used as data directories for tests.
 
Field Summary
protected static java.io.File DEFAULT_ROOT_DIRECTORY
          Default root data directory containing java versions subdirectories.
 
Constructor Summary
JMergerTestSuite(java.lang.String name)
           
 
Method Summary
protected  void addTestCases(junit.framework.TestSuite ts, java.io.File dataDirectory)
          Adds tests that can be ran for the given data directory to the test suite.
protected  junit.framework.TestSuite createSingleInputTestSuite(java.io.File dataDirectory)
          Creates and returns test suite for a single input directory.
protected  junit.framework.TestSuite createTestSuiteRecursively(java.io.File directory)
          Creates a test suite recursively for all directories in the directory tree.
protected  java.io.File determineRootDataDirectory()
           
protected  void populateSuite()
          Populates suite with test cases for each data directory.
static junit.framework.TestSuite suite()
           
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ROOT_DIRECTORY

protected static final java.io.File DEFAULT_ROOT_DIRECTORY
Default root data directory containing java versions subdirectories.

Default is /data/merge.input

See Also:
JMergerTest.DIRECTORY_NAMES_TO_JAVA_VERSIONS
Constructor Detail

JMergerTestSuite

public JMergerTestSuite(java.lang.String name)
Parameters:
name -
Method Detail

suite

public static junit.framework.TestSuite suite()

determineRootDataDirectory

protected java.io.File determineRootDataDirectory()
Returns:
root data directory containing subdirectories for different versions of Java
See Also:
JMergerTest.DIRECTORY_NAMES_TO_JAVA_VERSIONS

populateSuite

protected void populateSuite()
Populates suite with test cases for each data directory.


createTestSuiteRecursively

protected junit.framework.TestSuite createTestSuiteRecursively(java.io.File directory)
Creates a test suite recursively for all directories in the directory tree. Directories used as input must be accepted by JMergerTestSuite.JMergerDataDirectoryFilter.

Parameters:
directory - root directory to create test suite for
Returns:
resulting test suite

createSingleInputTestSuite

protected junit.framework.TestSuite createSingleInputTestSuite(java.io.File dataDirectory)
Creates and returns test suite for a single input directory.

Parameters:
dataDirectory - directory containing directory with subDirectoryName

addTestCases

protected void addTestCases(junit.framework.TestSuite ts,
                            java.io.File dataDirectory)
Adds tests that can be ran for the given data directory to the test suite.

Parameters:
ts - test suite to add tests to
dataDirectory -

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.