Package org.nuiton.eugene.java
Class JavaBuilderTest
- java.lang.Object
-
- org.nuiton.eugene.java.JavaBuilderTest
-
public class JavaBuilderTest extends Object
JavaBuilderTest Created: 29 oct. 2009- Author:
- Florian Desbois - desbois@codelutin.com
-
-
Constructor Summary
Constructors Constructor Description JavaBuilderTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testAddAttribute()
Test of addAttribute method, of class JavaBuilder.void
testAddAttributeObjectModelClassifierObjectModelAttribute()
Test of addAttribute method, of class JavaBuilder.void
testAddConstant()
Test of addConstant method, of class JavaBuilder.void
testAddConstructor()
Test of addConstructor method, of class JavaBuilder.void
testAddException()
Test of addException method, of class JavaBuilder.void
testAddImport()
Test of addImport method, of class JavaBuilder.void
testAddInterface()
Test of addInterface method, of class JavaBuilder.void
testAddOperation()
Test of addOperation method, of class JavaBuilder.void
testAddParameter()
Test of addParameter method, of class JavaBuilder.void
testCreateAbstractClass()
Test of createAbstractClass method, of class JavaBuilder.void
testCreateClass()
Test of createClass method, of class JavaBuilder.void
testGetModel()
Test of getModel.void
testSetOperationBody()
Test of setOperationBody method, of class JavaBuilder.void
testSetSuperClass()
Test of setSuperClass method, of class JavaBuilder.
-
-
-
Method Detail
-
testGetModel
public void testGetModel()
Test of getModel. No test needed : model created in modelBuilder instanciated in constructor (ObjectModelBuilder).- See Also:
ObjectModelBuilderTest.testGetModel()
-
testAddImport
public void testAddImport()
Test of addImport method, of class JavaBuilder. Prerequisite : existing classifier in model. - Add a simple type to import. - Add a type to import with generic (List of Category) : two imports are added. NOTE : Use of ImportsManager addImport() method and GeneratorUtil getTypesList() method.- See Also:
GeneratorUtilTest.testGetTypesList()
-
testCreateClass
public void testCreateClass()
Test of createClass method, of class JavaBuilder. No test needed : call of createClass in ObjectModelBuilder- See Also:
ObjectModelBuilderTest.testCreateClass()
-
testCreateAbstractClass
public void testCreateAbstractClass()
Test of createAbstractClass method, of class JavaBuilder. Prerequisite : none. - Create an abstract class.
-
testSetSuperClass
public void testSetSuperClass()
Test of setSuperClass method, of class JavaBuilder. Only one superclass can be set. Check imports on superclass qualified name
-
testAddInterface
public void testAddInterface()
Test of addInterface method, of class JavaBuilder. Check imports on adding interface : imports added on interfaceQualifiedName
-
testAddConstant
public void testAddConstant()
Test of addConstant method, of class JavaBuilder. Prerequisite : existing classifier in model. - Add a public constant attribute (static, final)
-
testAddAttribute
public void testAddAttribute()
Test of addAttribute method, of class JavaBuilder. Check imports on adding attribute : imports added on type and value.
-
testAddAttributeObjectModelClassifierObjectModelAttribute
public void testAddAttributeObjectModelClassifierObjectModelAttribute()
Test of addAttribute method, of class JavaBuilder. Prerequisite : existing classifier in model. - Add an attribute from an existing one
-
testAddConstructor
public void testAddConstructor()
Test of addConstructor method, of class JavaBuilder. Prerequisite : existing class in model. - Add a constructor to an existing class. NOTE : operation.getReturnType doesn't get the good type (ie. "void")
-
testAddOperation
public void testAddOperation()
Test of addOperation method, of class JavaBuilder. Check imports on adding operation : returnType of the operation
-
testAddParameter
public void testAddParameter()
Test of addParameter method, of class JavaBuilder. Check imports on adding parameter : type of the parameter
-
testAddException
public void testAddException()
Test of addException method, of class JavaBuilder. Check imports on adding exception : exception name
-
testSetOperationBody
public void testSetOperationBody()
Test of setOperationBody method, of class JavaBuilder. No body code for an abstract operation : throw an IllegalArgumentException
-
-