public class CartridgeTest extends junit.framework.TestCase
This is the entry point of the cartridge test suite for AndroMDA. The
test checks for a list of expected files that a file with the same name and
the same package was generated by AndroMDA and that the APIs of the expected
file and the generated file are equal. CartridgeTest
acts as
the test director which creates the list of files to be compared. The actual
API comparison is carried out by instances of FileComparator
.
Modifier and Type | Field and Description |
---|---|
static String |
ACTUAL_DIRECTORY
Points to the directory where the generated files are located.
|
static String |
BINARY_SUFFIXES
Defines the suffixes of binary files (files that will be not be
compared as strings).
|
static String |
EXPECTED_DIRECTORY
Points to the directory where the expected files are stored which will be
compared to the generated ones.
|
Constructor and Description |
---|
CartridgeTest(String name) |
Modifier and Type | Method and Description |
---|---|
static CartridgeTest |
instance()
Retrieves the shared instance of this class.
|
protected void |
setActualOutputDirectory(File file)
Used when resetting the cartridge test instance, to avoid results overlap
|
void |
setActualOutputPath(String actualOutputPath)
Sets the path to the actual directory (that is the
directory which contains the actual output being tested.
|
void |
setBinarySuffixes(String binarySuffixes)
Sets the value of the suffixes that indicate a binary file (binary files
are not compared as text).
|
protected void |
setExpectedOutputDirectory(File file)
Resets the expected output directory.
|
void |
setExpectedOutputPath(String expectedOutputPath)
Sets the path to the expected directory.
|
void |
shutdown()
Releases any resources held by this cartridge test instance.
|
static junit.framework.Test |
suite() |
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public static final String EXPECTED_DIRECTORY
public static final String ACTUAL_DIRECTORY
public static final String BINARY_SUFFIXES
public CartridgeTest(String name)
name
- public static final CartridgeTest instance()
public void setBinarySuffixes(String binarySuffixes)
binarySuffixes
- a comma separated list of binary suffixes.public void setActualOutputPath(String actualOutputPath)
actualOutputPath
- the path to the actual directory.public void setExpectedOutputPath(String expectedOutputPath)
expectedOutputPath
- the path to the expected output directory.public static junit.framework.Test suite()
protected void setExpectedOutputDirectory(File file)
file
- the file representing the directory.protected void setActualOutputDirectory(File file)
file
- public void shutdown()
Copyright © 2005–2014 AndroMDA.org. All rights reserved.