de.topicmapslab.majortom.importer.test.tests
Class ImportCtmTest

java.lang.Object
  extended by de.topicmapslab.majortom.importer.test.tests.ImportCtmTest

public class ImportCtmTest
extends java.lang.Object

CTM import test


Field Summary
private  java.lang.String databaseBaseLocator
           
private  org.tmapi.core.TopicMap db_map
           
private  org.tmapi.core.TopicMap memory_map
           
 
Constructor Summary
ImportCtmTest()
           
 
Method Summary
 void associations()
          Tests the import of associations
private  void checkAssociations(org.tmapi.core.TopicMap topicMap, java.lang.String topicSource)
           
private  void checkNames(org.tmapi.core.Topic topic, java.lang.String topicSource)
           
private  void checkOccurrences(org.tmapi.core.Topic topic, java.lang.String topicSource)
           
private  void exportTM(org.tmapi.core.TopicMap tm, java.lang.String filename, java.lang.String databaseBaseLocator)
           
 void identifier()
          Checks if all identifiers of hello_welt are imported
 void names()
          Tests the imported names
 void occurrences()
          Tests imported occurrences
 void setUp()
          Starts the import, creates a db and memory store and exports the two topic maps into the tmp directory
 void test()
          Compares the two exported files byte by byte
 void testImport()
           
 void type()
          Test if the hello_welt topic has a type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db_map

private org.tmapi.core.TopicMap db_map

memory_map

private org.tmapi.core.TopicMap memory_map

databaseBaseLocator

private java.lang.String databaseBaseLocator
Constructor Detail

ImportCtmTest

public ImportCtmTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Starts the import, creates a db and memory store and exports the two topic maps into the tmp directory

Throws:
java.lang.Exception

testImport

public void testImport()
                throws java.lang.Exception
Throws:
java.lang.Exception

type

public void type()
Test if the hello_welt topic has a type


identifier

public void identifier()
Checks if all identifiers of hello_welt are imported


names

public void names()
Tests the imported names


occurrences

public void occurrences()
Tests imported occurrences


associations

public void associations()
Tests the import of associations


test

public void test()
          throws java.lang.Exception
Compares the two exported files byte by byte

Throws:
java.io.IOException - if loading or reading fails
java.lang.Exception

exportTM

private void exportTM(org.tmapi.core.TopicMap tm,
                      java.lang.String filename,
                      java.lang.String databaseBaseLocator)
               throws java.io.FileNotFoundException,
                      java.io.IOException,
                      java.lang.Exception
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.Exception

checkAssociations

private void checkAssociations(org.tmapi.core.TopicMap topicMap,
                               java.lang.String topicSource)

checkOccurrences

private void checkOccurrences(org.tmapi.core.Topic topic,
                              java.lang.String topicSource)

checkNames

private void checkNames(org.tmapi.core.Topic topic,
                        java.lang.String topicSource)