com.ashridgetech.jamda.test
Class ClassWriterTest

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

public class ClassWriterTest
extends BaseTest

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


Field Summary
protected static java.lang.String NL
           
 
Fields inherited from class com.ashridgetech.jamda.test.BaseTest
checkTextIgnorePrefixes, classWriter, MAGICDRAW_STYLESHEET_LOCATION, NO_NAMES, NO_TYPES, projectRoot, stringWriter, testFile
 
Constructor Summary
ClassWriterTest(java.lang.String name)
          Standard constructor required by subclasses of TestCase
 
Method Summary
 void testBeginMethod2()
          Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails) with package scope, one parameter, documentation for the method only.
 void testBeginMethod3()
          Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails) with full monty.
 void testBeginMethodInterface()
          Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails).
 void testBeginMethodSimple()
          Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails).
 void testClassDecl()
          Tests ClassWriter.classDecl(java.lang.String, int, java.lang.String, java.util.Collection).
 void testClassDoc()
          Tests ClassWriter.classDoc(java.lang.String).
 void testCommaList()
          Tests CodeWriter.commaList(java.util.Collection).
 void testCopy()
          Tests CodeWriter.copyWithIndent(java.io.Reader) and CodeWriter.copyNoIndent(java.io.Reader).
 void testField()
          Tests ClassWriter.field(java.lang.String, java.lang.String, int).
 void testFileHeader()
          Tests ClassWriter.fileHeader(java.lang.String, java.lang.String).
 void testImports()
          Tests ClassWriter.imports(java.util.Collection).
 void testInterfaceDecl()
          Tests ClassWriter.interfaceDecl(java.lang.String, int, java.util.Collection).
 void testJavaWriter()
          Tests JavaWriter methods.
 void testLinesBlocks()
          Tests various ClassWriter line writing functions.
 void testPackageDecl()
          Tests ClassWriter.packageDecl(java.lang.String).
 void testWrite()
          Tests various ClassWriter basic write functions.
 
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, setUp, 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
Constructor Detail

ClassWriterTest

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

Parameters:
name - name
Method Detail

testWrite

public void testWrite()
Tests various ClassWriter basic write functions.


testLinesBlocks

public void testLinesBlocks()
Tests various ClassWriter line writing functions.


testCommaList

public void testCommaList()
Tests CodeWriter.commaList(java.util.Collection).


testCopy

public void testCopy()
              throws java.io.IOException
Tests CodeWriter.copyWithIndent(java.io.Reader) and CodeWriter.copyNoIndent(java.io.Reader).

java.io.IOException

testJavaWriter

public void testJavaWriter()
Tests JavaWriter methods.


testFileHeader

public void testFileHeader()
Tests ClassWriter.fileHeader(java.lang.String, java.lang.String).


testPackageDecl

public void testPackageDecl()
Tests ClassWriter.packageDecl(java.lang.String).


testImports

public void testImports()
Tests ClassWriter.imports(java.util.Collection).


testClassDoc

public void testClassDoc()
Tests ClassWriter.classDoc(java.lang.String).


testClassDecl

public void testClassDecl()
Tests ClassWriter.classDecl(java.lang.String, int, java.lang.String, java.util.Collection).


testInterfaceDecl

public void testInterfaceDecl()
Tests ClassWriter.interfaceDecl(java.lang.String, int, java.util.Collection).


testField

public void testField()
Tests ClassWriter.field(java.lang.String, java.lang.String, int).


testBeginMethodSimple

public void testBeginMethodSimple()
Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails).


testBeginMethodInterface

public void testBeginMethodInterface()
Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails).


testBeginMethod2

public void testBeginMethod2()
Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails) with package scope, one parameter, documentation for the method only.


testBeginMethod3

public void testBeginMethod3()
Tests ClassWriter.beginMethod(com.ashridgetech.jamda.code.ClassWriter.MethodDetails) with full monty.



Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.