com.ashridgetech.jamda.test
Class UmlClassGeneratorTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--com.ashridgetech.jamda.test.BaseTest
                    |
                    +--com.ashridgetech.jamda.test.UmlClassGeneratorTest
All Implemented Interfaces:
junit.framework.Test

public class UmlClassGeneratorTest
extends BaseTest

Tests the UmlClassGenerator class. Invoke via junit.swingui.TestRunner.


Field Summary
protected  Attribute attr1
           
protected  Attribute attr2
           
protected  Attribute attr3
           
protected  Constructor con1
           
protected  ClassType dateType
           
(package private) static java.lang.String expectedFile
           
(package private) static java.lang.String expectedFilePath
           
protected  TestMethodCoderFactory factoryA
           
protected  TestMethodCoderFactory factoryB
           
protected  TestMethodCoderFactory factoryC
           
protected  TestMethodCoderFactory factoryD
           
protected  UmlClassGenerator gen
           
protected  UmlClassGenerator gen2
           
protected  UmlClassGenerator gen3
           
protected  UmlClassGenerator gen4
           
protected  UmlInterfaceGenerator genA
           
protected  UmlInterfaceGenerator genB
           
protected  DataType intType
           
protected static java.lang.String NL
           
protected  Operation op1
           
protected  Operation op2
           
protected  Operation op3
           
protected  ClassType stringType
           
(package private) static java.lang.String templateFile
           
(package private) static java.lang.String templateFilePath
           
protected  ClassType testClass1
           
protected  ClassType testClass2
           
protected  ClassType testClass3
           
protected  ClassType testClass4
           
protected  InterfaceType testInterfaceA
           
protected  InterfaceType testInterfaceB
           
protected  Stereotype testOpStereotypeA
           
protected  Stereotype testOpStereotypeB
           
protected  ModelPackage testPackage
           
protected  ModelPackage testPackage2
           
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
UmlClassGeneratorTest(java.lang.String name)
          Standard constructor required by subclasses of TestCase
 
Method Summary
protected  Model getTemplate()
           
 void setUp()
          Standard JUnit setup - loads model, creates test ClassType, creates generators
 void testBasic()
          Tests various UmlClassGenerator basic functions.
 void testGenerate()
          Tests UmlClassGenerator class generation.
 
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

NL

protected static java.lang.String NL

templateFile

static java.lang.String templateFile

templateFilePath

static java.lang.String templateFilePath

expectedFile

static java.lang.String expectedFile

expectedFilePath

static java.lang.String expectedFilePath

stringType

protected ClassType stringType

dateType

protected ClassType dateType

intType

protected DataType intType

voidType

protected DataType voidType

testPackage

protected ModelPackage testPackage

testPackage2

protected ModelPackage testPackage2

testClass1

protected ClassType testClass1

testClass2

protected ClassType testClass2

testClass3

protected ClassType testClass3

testClass4

protected ClassType testClass4

testInterfaceA

protected InterfaceType testInterfaceA

testInterfaceB

protected InterfaceType testInterfaceB

attr1

protected Attribute attr1

attr2

protected Attribute attr2

attr3

protected Attribute attr3

op1

protected Operation op1

op2

protected Operation op2

op3

protected Operation op3

con1

protected Constructor con1

testOpStereotypeA

protected Stereotype testOpStereotypeA

testOpStereotypeB

protected Stereotype testOpStereotypeB

factoryA

protected TestMethodCoderFactory factoryA

factoryB

protected TestMethodCoderFactory factoryB

factoryC

protected TestMethodCoderFactory factoryC

factoryD

protected TestMethodCoderFactory factoryD

gen

protected UmlClassGenerator gen

gen2

protected UmlClassGenerator gen2

gen3

protected UmlClassGenerator gen3

gen4

protected UmlClassGenerator gen4

genA

protected UmlInterfaceGenerator genA

genB

protected UmlInterfaceGenerator genB
Constructor Detail

UmlClassGeneratorTest

public UmlClassGeneratorTest(java.lang.String name)
Standard constructor required by subclasses of TestCase

Parameters:
name - name of test to run
Method Detail

getTemplate

protected Model getTemplate()

setUp

public void setUp()
Standard JUnit setup - loads model, creates test ClassType, creates generators

Overrides:
setUp in class junit.framework.TestCase

testBasic

public void testBasic()
               throws java.io.IOException
Tests various UmlClassGenerator basic functions.

java.io.IOException

testGenerate

public void testGenerate()
                  throws java.io.IOException
Tests UmlClassGenerator class generation.

java.io.IOException


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.