test.de.uni_paderborn.fujaba.uml
Class UMLTestBase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bytest.de.uni_paderborn.fujaba.uml.UMLTestBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TestAttr, TestClazzAndPackage, TestElevatorProject, TestFormatFile, TestInheritance, UMLClassTest

public class UMLTestBase
extends junit.framework.TestCase

Base Clazz for Fujaba JUnit tests

contains many useful utilities .

Version:
$Revision: 1.7.2.1 $
Author:
$Author: lowende $

Constructor Summary
UMLTestBase(java.lang.String arg0)
           
 
Method Summary
protected  void clearDir(java.io.File generatedDir)
          remove all files in generatedDir
protected  boolean codeEquals(java.lang.StringBuffer buff, java.lang.StringBuffer expected)
          compare buff and expected line-by-line.
protected  void computeDifferenceBetweenDirectories(java.io.File expDir, java.io.File genDir)
           
protected  java.io.File createEmptyGeneratedDir(UMLProject elevatorProject)
           
protected  void defaultFprTest()
           
protected  void ensureEmptyGeneratedDir(java.io.File generatedDir)
           
protected  void formatFile(java.lang.String filename)
          No comment provided by developer, please add a comment to improve documentation.
protected  java.io.File getDirForExpectedSources()
          get the directory for expected sources testcase this .
protected  java.io.File getDirForGeneratedSources()
          get the directory for generated sources testcase this .
protected  java.io.File getFprFile()
          get fujaba project file for testcase this .
protected  java.lang.String getFullNameAsDirName()
          Get the fullNameAsDirName attribute of the UMLTestBase object
protected  java.io.File getTmpDir()
          get the directory for temporary sources .
protected  void setOutputDirectory(UMLProject elevatorProject, java.io.File genDir)
           
protected  void setUp()
           
protected  void tearDown()
           
 void testNothing()
          to avoid JUnit warning
protected  java.lang.String unixToPlatformDir(java.lang.String unixdir)
          convert unix dir to platform dependent dir.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

UMLTestBase

public UMLTestBase(java.lang.String arg0)
Parameters:
arg0 -
Method Detail

testNothing

public void testNothing()
to avoid JUnit warning


setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception - Exception description not provided
See Also:
TestCase.setUp()

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception - Exception description not provided
See Also:
TestCase.tearDown()

createEmptyGeneratedDir

protected java.io.File createEmptyGeneratedDir(UMLProject elevatorProject)
Parameters:
elevatorProject -
Returns:

clearDir

protected void clearDir(java.io.File generatedDir)
remove all files in generatedDir

Parameters:
generatedDir - No description provided

codeEquals

protected boolean codeEquals(java.lang.StringBuffer buff,
                             java.lang.StringBuffer expected)
compare buff and expected line-by-line. ignore empty lines and leading and trailing spaces.

Parameters:
buff -
expected -
Returns:

formatFile

protected void formatFile(java.lang.String filename)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
filename - No description provided

unixToPlatformDir

protected java.lang.String unixToPlatformDir(java.lang.String unixdir)
convert unix dir to platform dependent dir.

Parameters:
unixdir - No description provided
Returns:

getFullNameAsDirName

protected java.lang.String getFullNameAsDirName()
Get the fullNameAsDirName attribute of the UMLTestBase object

Returns:
The fullNameAsDirName value

getFprFile

protected java.io.File getFprFile()
get fujaba project file for testcase this .

Returns:

getDirForGeneratedSources

protected java.io.File getDirForGeneratedSources()
get the directory for generated sources testcase this .

Returns:

ensureEmptyGeneratedDir

protected void ensureEmptyGeneratedDir(java.io.File generatedDir)
Parameters:
generatedDir - No description provided

setOutputDirectory

protected void setOutputDirectory(UMLProject elevatorProject,
                                  java.io.File genDir)
Parameters:
elevatorProject -
genDir -

getDirForExpectedSources

protected java.io.File getDirForExpectedSources()
get the directory for expected sources testcase this .

Returns:

getTmpDir

protected java.io.File getTmpDir()
get the directory for temporary sources .

Returns:

computeDifferenceBetweenDirectories

protected void computeDifferenceBetweenDirectories(java.io.File expDir,
                                                   java.io.File genDir)
Parameters:
expDir -
genDir -

defaultFprTest

protected void defaultFprTest()