|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--com.ashridgetech.jamda.test.BaseTest | +--com.ashridgetech.jamda.test.ValueObjectTest
Tests updates to the com.ashridgetech.jamda.ejb.uml package classes. Invoke via junit.swingui.TestRunner. Assumes the use of the ecomm2j test package. Further tests needed: Class with superclass
Field Summary | |
protected ClassType |
address
|
protected DataType |
booleanType
|
protected ClassType |
company
|
protected ClassType |
customer
|
protected ClassType |
customerType
|
protected ClassType |
dateType
|
protected DataTransferObjectTypeFactory |
dtoFactory
|
protected java.util.List |
factoryList
|
protected ClassType |
integerType
|
protected DataType |
intType
|
protected InterfaceType |
listType
|
protected Type |
oidType
|
protected ClassType |
order
|
protected Stereotype |
propertyInitStereotype
|
protected ClassType |
salesperson
|
protected ClassType |
stringType
|
static java.lang.String |
updatedFileName
|
protected DataType |
voidType
|
Fields inherited from class com.ashridgetech.jamda.test.BaseTest |
checkTextIgnorePrefixes, classWriter, MAGICDRAW_STYLESHEET_LOCATION, NO_NAMES, NO_TYPES, projectRoot, stringWriter, testFile |
Constructor Summary | |
ValueObjectTest(java.lang.String name)
Standard constructor required by subclasses of TestCase |
Method Summary | |
protected void |
assertHasParameter(Operation operation,
int paramPosition,
java.lang.String name,
Type type,
Stereotype stereotype)
Tests that an Operation has a certain Parameter in a certain position in its parameter list. |
protected void |
assertHasParameter(Operation operation,
java.lang.String name,
Type type,
Stereotype stereotype)
Tests that an Operation has a certain Parameter somewhere in its parameter list. |
protected void |
assertHasProperty(StructuredType type,
java.lang.String name,
Type propertyType,
boolean readWrite,
boolean hasAttribute)
Tests that a class or interface has a certain property. |
protected boolean |
doUpdates()
|
protected boolean |
doWriteAndRepeat()
|
protected void |
retrieveModel(java.lang.String fileName,
boolean transformWithXslt)
|
protected void |
setUp()
|
static junit.framework.Test |
suite()
|
void |
testDescObjectType()
Tests that DescObjectType s are created correctly. |
void |
testUpdateObjectType()
Tests that UpdateObjectType s are created correctly. |
void |
testValueObjectCodeGen()
Tests that ValueObjectCreator followed by
CodeGenTransformer leads to correct files. |
void |
testValueObjectCreator()
Tests that ValueObjectCreator transforms correctly. |
void |
testValueObjectType()
Tests that ValueObjectType s are created correctly. |
void |
testValueObjectTypeForSubclass()
Tests that ValueObjectType s for subclasses are created correctly. |
boolean |
writeAndRepeat()
|
void |
writeXmiFile()
Writes the updated model to a new XMI file |
Methods inherited from class com.ashridgetech.jamda.test.BaseTest |
assertContains, assertContainsAsString, assertContainsOnly, assertContainsOnly, assertContainsOnly, assertContainsOnly, assertEmpty, assertNotContainsAsString, checkAssocEnd, checkAttribute, checkEquals, checkEquals, checkOperation, checkProperty, checkText, checkText, checkTextIgnore, fullPathName, getModel, getText, loadModel, loadModel, testFileName |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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 |
Field Detail |
public static final java.lang.String updatedFileName
protected ClassType stringType
protected ClassType dateType
protected InterfaceType listType
protected ClassType integerType
protected Type oidType
protected DataType intType
protected DataType voidType
protected DataType booleanType
protected ClassType address
protected ClassType customer
protected ClassType customerType
protected ClassType company
protected ClassType order
protected ClassType salesperson
protected Stereotype propertyInitStereotype
protected DataTransferObjectTypeFactory dtoFactory
protected java.util.List factoryList
Constructor Detail |
public ValueObjectTest(java.lang.String name)
TestCase
name
- nameMethod Detail |
public static junit.framework.Test suite()
protected void setUp()
setUp
in class junit.framework.TestCase
protected void retrieveModel(java.lang.String fileName, boolean transformWithXslt)
protected boolean doUpdates()
protected boolean doWriteAndRepeat()
public void testValueObjectType() throws java.io.IOException
ValueObjectType
s are created correctly.
java.io.IOException
public void testDescObjectType() throws java.io.IOException
DescObjectType
s are created correctly.
java.io.IOException
public void testUpdateObjectType() throws java.io.IOException
UpdateObjectType
s are created correctly.
java.io.IOException
public void testValueObjectTypeForSubclass() throws java.io.IOException
ValueObjectType
s for subclasses are created correctly.
java.io.IOException
public void writeXmiFile() throws java.io.IOException
java.io.IOException
public boolean writeAndRepeat() throws java.io.IOException
java.io.IOException
protected void assertHasProperty(StructuredType type, java.lang.String name, Type propertyType, boolean readWrite, boolean hasAttribute)
type
- the StructuredType
which should contain the propertyname
- the name of the propertypropertyType
- the type of the propertyreadWrite
- true if the property should have a setterhasAttribute
- true if the property should have an attributepublic void testValueObjectCreator() throws java.io.IOException, ModelTransformer.TransformException
ValueObjectCreator
transforms correctly.
java.io.IOException
ModelTransformer.TransformException
public void testValueObjectCodeGen() throws java.io.IOException, ModelTransformer.TransformException
ValueObjectCreator
followed by
CodeGenTransformer
leads to correct files.
java.io.IOException
ModelTransformer.TransformException
protected void assertHasParameter(Operation operation, int paramPosition, java.lang.String name, Type type, Stereotype stereotype)
Operation
has a certain Parameter
in a certain position in its parameter list.
operation
- the Operation
which should contain the parameterparamPosition
- the position of the parameter in the listname
- the name of the parametertype
- the type of the parameterstereotype
- the stereotype of the parameterprotected void assertHasParameter(Operation operation, java.lang.String name, Type type, Stereotype stereotype)
Operation
has a certain Parameter
somewhere in its parameter list.
operation
- the Operation
which should contain the parametername
- the name of the parametertype
- the type of the parameterstereotype
- the stereotype of the parameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |