Index: src/unittests/BondGraphUnitTest.cpp
===================================================================
--- src/unittests/BondGraphUnitTest.cpp	(revision 0b004b9c4dd37a728f061baad5c2608f74225c66)
+++ 	(revision )
@@ -1,168 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BondGraphUnitTest.cpp
- *
- *  Created on: Oct 29, 2009
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-using namespace std;
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include <iostream>
-#include <stdio.h>
-#include <cstring>
-
-#include "CodePatterns/Assert.hpp"
-
-#include "atom.hpp"
-#include "Bond/bond.hpp"
-#include "CodePatterns/Log.hpp"
-#include "element.hpp"
-#include "Graph/BondGraph.hpp"
-#include "molecule.hpp"
-#include "periodentafel.hpp"
-#include "World.hpp"
-#include "WorldTime.hpp"
-
-#include "BondGraphUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( BondGraphTest );
-
-
-void BondGraphTest::setUp()
-{
-  atom *Walker = NULL;
-
-  // construct element
-  hydrogen = World::getInstance().getPeriode()->FindElement(1);
-  carbon = World::getInstance().getPeriode()->FindElement(6);
-  CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen");
-  CPPUNIT_ASSERT(carbon != NULL && "could not find element carbon");
-
-  // construct molecule (tetraeder of hydrogens)
-  TestMolecule = World::getInstance().createMolecule();
-  CPPUNIT_ASSERT(TestMolecule != NULL && "could not create molecule");
-  Walker = World::getInstance().createAtom();
-  CPPUNIT_ASSERT(Walker != NULL && "could not create atom");
-  Walker->setType(carbon);
-  Walker->setPosition(Vector(1., 0., 1. ));
-  TestMolecule->AddAtom(Walker);
-
-  Walker = World::getInstance().createAtom();
-  CPPUNIT_ASSERT(Walker != NULL && "could not create atom");
-  Walker->setType(carbon);
-  Walker->setPosition(Vector(0., 1., 1. ));
-  TestMolecule->AddAtom(Walker);
-
-  Walker = World::getInstance().createAtom();
-  CPPUNIT_ASSERT(Walker != NULL && "could not create atom");
-  Walker->setType(carbon);
-  Walker->setPosition(Vector(1., 1., 0. ));
-  TestMolecule->AddAtom(Walker);
-
-  Walker = World::getInstance().createAtom();
-  CPPUNIT_ASSERT(Walker != NULL && "could not create atom");
-  Walker->setType(carbon);
-  Walker->setPosition(Vector(0., 0., 0. ));
-  TestMolecule->AddAtom(Walker);
-
-  // check that TestMolecule was correctly constructed
-  CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 );
-
-  // create stream with table
-  test << ".\tH\tHe\tLi\tBe\tB\tC\n";
-  test << "H\t1.\t1.\t1.\t1.\t1.\t1.2\n";
-  test << "He\t1.\t1.\t1.\t1.\t1.\t1.\n";
-  test << "Li\t1.\t1.\t1.\t1.\t1.\t1.\n";
-  test << "Be\t1.\t1.\t1.\t1.\t1.\t1.\n";
-  test << "B\t1.\t1.\t1.\t1.\t1.\t1.\n";
-  test << "C\t1.2\t1.\t1.\t1.\t1.\t1.5\n";
-  // created bad stream (i.e. non-present file)
-  dummy.setstate(ios::eofbit);
-  CPPUNIT_ASSERT(dummy.eof());
-  BG = new BondGraph(true);
-  CPPUNIT_ASSERT(BG != NULL && "could not create BondGraph");
-};
-
-
-void BondGraphTest::tearDown()
-{
-  // remove the file
-  delete(BG);
-
-  // remove molecule
-  World::getInstance().destroyMolecule(TestMolecule);
-  // note that all the atoms, molecules, the tafel and the elements
-  // are all cleaned when the world is destroyed
-  World::purgeInstance();
-  logger::purgeInstance();
-};
-
-/** Tests whether setup worked.
- */
-void BondGraphTest::SetupTest()
-{
-  CPPUNIT_ASSERT_EQUAL (false, TestMolecule->empty());
-  CPPUNIT_ASSERT_EQUAL ((size_t)4, TestMolecule->size());
-};
-
-/** UnitTest for BondGraphTest::LoadBondLengthTable().
- */
-void BondGraphTest::LoadTableTest()
-{
-  CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(test) );
-  CPPUNIT_ASSERT_EQUAL( 1., BG->GetBondLength(0,0) );
-  CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0,5) );
-  CPPUNIT_ASSERT_EQUAL( 1.5, BG->GetBondLength(5,5) );
-};
-
-/** UnitTest for BondGraphTest::CreateAdjacency().
- */
-void BondGraphTest::ConstructGraphFromTableTest()
-{
-  molecule::iterator Walker = TestMolecule->begin();
-  molecule::iterator Runner = TestMolecule->begin();
-  Runner++;
-  CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(test) );
-  molecule::atomVector Set = TestMolecule->getAtomSet();
-  BG->CreateAdjacency(Set);
-  CPPUNIT_ASSERT( TestMolecule->getBondCount() != 0);
-  CPPUNIT_ASSERT_EQUAL( true , (*Walker)->IsBondedTo(WorldTime::getTime(), (*Runner)) );
-};
-
-/** UnitTest for BondGraphTest::CreateAdjacency().
- */
-void BondGraphTest::ConstructGraphFromCovalentRadiiTest()
-{
-
-  CPPUNIT_ASSERT_EQUAL( false , BG->LoadBondLengthTable(dummy) );
-  molecule::atomVector Set = TestMolecule->getAtomSet();
-  BG->CreateAdjacency(Set);
-  CPPUNIT_ASSERT( TestMolecule->getBondCount() != 0);
-
-  // this cannot be assured using dynamic IDs
-  //CPPUNIT_ASSERT_EQUAL( true , Walker->IsBondedTo(Runner) );
-};
-
Index: src/unittests/BondGraphUnitTest.hpp
===================================================================
--- src/unittests/BondGraphUnitTest.hpp	(revision 0b004b9c4dd37a728f061baad5c2608f74225c66)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * BondGraphUnitTest.hpp
- *
- *  Created on: Oct 29, 2009
- *      Author: heber
- */
-
-#ifndef BONDGRAPHUNITTEST_HPP_
-#define BONDGRAPHUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-
-class BondGraph;
-class element;
-class molecule;
-class periodentafel;
-
-/********************************************** Test classes **************************************/
-
-class BondGraphTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( BondGraphTest) ;
-    CPPUNIT_TEST ( SetupTest );
-    CPPUNIT_TEST ( LoadTableTest );
-    CPPUNIT_TEST ( ConstructGraphFromTableTest );
-    CPPUNIT_TEST ( ConstructGraphFromCovalentRadiiTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-      void setUp();
-      void tearDown();
-      void SetupTest();
-      void LoadTableTest();
-      void ConstructGraphFromTableTest();
-      void ConstructGraphFromCovalentRadiiTest();
-
-private:
-
-      molecule *TestMolecule;
-      const element *hydrogen;
-      const element *carbon;
-
-      BondGraph *BG;
-      std::stringstream dummy;
-      std::stringstream test;
-};
-
-#endif /* BONDGRAPHUNITTEST_HPP_ */
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 0b004b9c4dd37a728f061baad5c2608f74225c66)
+++ src/unittests/Makefile.am	(revision 629e436dfaae8a6f744563906c2fb347afa4a696)
@@ -9,4 +9,5 @@
 include ../../src/Descriptors/unittests/Makefile.am
 include ../../src/Fragmentation/unittests/Makefile.am
+include ../../src/Graph/unittests/Makefile.am
 include ../../src/Parser/unittests/Makefile.am
 include ../../src/RandomNumbers/unittests/Makefile.am
@@ -26,5 +27,4 @@
   AnalysisCorrelationToSurfaceUnitTest \
   AnalysisPairCorrelationUnitTest \
-  BondGraphUnitTest \
   BoxUnitTest \
   CountBondsUnitTest \
@@ -59,4 +59,5 @@
 	${DESCRIPTORTESTSSOURCES} \
 	${FRAGMENTATIONTESTSSOURCES} \
+	${GRAPHTESTSSOURCES} \
 	${LINEARALGEBRATESTSSOURCES} \
 	${PARSERTESTSSOURCES} \
@@ -70,5 +71,4 @@
   AnalysisCorrelationToSurfaceUnitTest.cpp  \
   AnalysisPairCorrelationUnitTest.cpp \
-  BondGraphUnitTest.cpp \
   BoxUnitTest.cpp \
   CountBondsUnitTest.cpp \
@@ -84,4 +84,5 @@
 	${DESCRIPTORTESTSHEADERS} \
 	${FRAGMENTATIONTESTSHEADERS} \
+	${GRAPHTESTSHEADERS} \
 	${LINEARALGEBRATESTSHEADERS} \
 	${PARSERTESTSHEADERS} \
@@ -95,5 +96,4 @@
   AnalysisCorrelationToSurfaceUnitTest.hpp  \
   AnalysisPairCorrelationUnitTest.hpp \
-  BondGraphUnitTest.hpp \
   BoxUnitTest.hpp \
   CountBondsUnitTest.hpp \
@@ -125,9 +125,4 @@
 	AnalysisPairCorrelationUnitTest.hpp
 AnalysisPairCorrelationUnitTest_LDADD = ${ALLLIBS}
-
-BondGraphUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	BondGraphUnitTest.cpp \
-	BondGraphUnitTest.hpp
-BondGraphUnitTest_LDADD = ${ALLLIBS}
 
 BoxUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
