Index: src/unittests/AtomDescriptorTest.cpp
===================================================================
--- src/unittests/AtomDescriptorTest.cpp	(revision 456e78e35fb62976d5ccc14000867cdfdf3da8bc)
+++ 	(revision )
@@ -1,169 +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.
- */
-
-/*
- * DescriptorUnittest.cpp
- *
- *  Created on: Feb 9, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "AtomDescriptorTest.hpp"
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-#include <iostream>
-
-#include <Descriptors/AtomDescriptor.hpp>
-#include <Descriptors/AtomIdDescriptor.hpp>
-
-#include "World.hpp"
-#include "atom.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( AtomDescriptorTest );
-
-// set up and tear down
-void AtomDescriptorTest::setUp(){
-  World::getInstance();
-  for(int i=0;i<ATOM_COUNT;++i){
-    atoms[i]= World::getInstance().createAtom();
-    atomIds[i]= atoms[i]->getId();
-  }
-}
-
-void AtomDescriptorTest::tearDown(){
-  World::purgeInstance();
-}
-
-// some helper functions
-static bool hasAllAtoms(std::vector<atom*> atoms,atomId_t ids[ATOM_COUNT], std::set<atomId_t> excluded = std::set<atomId_t>()){
-  for(int i=0;i<ATOM_COUNT;++i){
-    atomId_t id = ids[i];
-    if(!excluded.count(id)){
-      std::vector<atom*>::iterator iter;
-      bool res=false;
-      for(iter=atoms.begin();iter!=atoms.end();++iter){
-        res |= (*iter)->getId() == id;
-      }
-      if(!res) {
-        cout << "Atom " << id << " missing in returned list" << endl;
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-static bool hasNoDuplicateAtoms(std::vector<atom*> atoms){
-  std::set<atomId_t> found;
-  std::vector<atom*>::iterator iter;
-  for(iter=atoms.begin();iter!=atoms.end();++iter){
-    int id = (*iter)->getId();
-    if(found.count(id))
-      return false;
-    found.insert(id);
-  }
-  return true;
-}
-
-
-void AtomDescriptorTest::AtomBaseSetsTest(){
-  std::vector<atom*> allAtoms = World::getInstance().getAllAtoms(AllAtoms());
-  CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(allAtoms,atomIds));
-  CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(allAtoms));
-
-  std::vector<atom*> noAtoms = World::getInstance().getAllAtoms(NoAtoms());
-  CPPUNIT_ASSERT_EQUAL( true , noAtoms.empty());
-}
-void AtomDescriptorTest::AtomIdTest(){
-  // test Atoms from boundaries and middle of the set
-  atom* testAtom;
-  testAtom = World::getInstance().getAtom(AtomById(atomIds[0]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[0], testAtom->getId());
-  testAtom = World::getInstance().getAtom(AtomById(atomIds[ATOM_COUNT/2]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtom->getId());
-  testAtom = World::getInstance().getAtom(AtomById(atomIds[ATOM_COUNT-1]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT-1], testAtom->getId());
-
-  // find some ID that has not been created
-  atomId_t outsideId=0;
-  bool res = false;
-  for(outsideId=0;!res;++outsideId) {
-    res = true;
-    for(int i = 0; i < ATOM_COUNT; ++i){
-      res &= atomIds[i]!=outsideId;
-    }
-  }
-  // test from outside of set
-  testAtom = World::getInstance().getAtom(AtomById(outsideId));
-  CPPUNIT_ASSERT(!testAtom);
-}
-void AtomDescriptorTest::AtomCalcTest(){
-  // test some elementary set operations
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(AllAtoms()||NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(NoAtoms()||AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(NoAtoms()&&AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(AllAtoms()&&NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(!AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(!NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
-  }
-  // exclude and include some atoms
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(AllAtoms()&&(!AtomById(atomIds[ATOM_COUNT/2])));
-    std::set<atomId_t> excluded;
-    excluded.insert(atomIds[ATOM_COUNT/2]);
-    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds,excluded));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
-    CPPUNIT_ASSERT_EQUAL( (size_t)(ATOM_COUNT-1), testAtoms.size());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::getInstance().getAllAtoms(NoAtoms()||(AtomById(atomIds[ATOM_COUNT/2])));
-    CPPUNIT_ASSERT_EQUAL( (size_t)1, testAtoms.size());
-    CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtoms[0]->getId());
-  }
-}
Index: src/unittests/AtomDescriptorTest.hpp
===================================================================
--- src/unittests/AtomDescriptorTest.hpp	(revision 456e78e35fb62976d5ccc14000867cdfdf3da8bc)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * AtomDescriptorTest.hpp
- *
- *  Created on: Feb 9, 2010
- *      Author: crueger
- */
-
-#ifndef ATOMDESCRIPTORTEST_HPP_
-#define ATOMDESCRIPTORTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "types.hpp"
-
-// we prefer enum over define
-enum { ATOM_COUNT = 10 };
-
-class atom;
-
-class AtomDescriptorTest : public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( AtomDescriptorTest );
-  CPPUNIT_TEST ( AtomBaseSetsTest );
-  CPPUNIT_TEST ( AtomIdTest );
-  CPPUNIT_TEST ( AtomCalcTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void AtomBaseSetsTest();
-  void AtomIdTest();
-  void AtomCalcTest();
-
-private:
-  atom *atoms [ATOM_COUNT];
-  atomId_t atomIds [ATOM_COUNT];
-};
-
-#endif /* ATOMDESCRIPTORTEST_HPP_ */
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 456e78e35fb62976d5ccc14000867cdfdf3da8bc)
+++ src/unittests/Makefile.am	(revision d766b57dc12ce7778425d65155b7159612ed7211)
@@ -4,4 +4,5 @@
 SUBDIRS = \
 	../Actions/unittests \
+	../Descriptors/unittests \
 	../Patterns/unittests
 
@@ -18,5 +19,4 @@
   AnalysisPairCorrelationUnitTest \
   atomsCalculationTest \
-  AtomDescriptorTest \
   BondGraphUnitTest \
   BoxUnittest \
@@ -77,5 +77,5 @@
   AnalysisCorrelationToSurfaceUnitTest.cpp  \
   AnalysisPairCorrelationUnitTest.cpp \
-  AtomDescriptorTest.cpp \
+  ../Descriptors/unittests/AtomDescriptorUnitTest.cpp \
   atomsCalculationTest.cpp \
   bondgraphunittest.cpp \
@@ -117,5 +117,5 @@
   AnalysisCorrelationToSurfaceUnitTest.hpp  \
   AnalysisPairCorrelationUnitTest.hpp \
-  AtomDescriptorTest.hpp \
+  ../Descriptors/unittests/AtomDescriptorUnitTest.hpp \
   atomsCalculationTest.hpp \
   bondgraphunittest.hpp \
@@ -167,7 +167,4 @@
 atomsCalculationTest_LDADD = ${ALLLIBS}
 
-AtomDescriptorTest_SOURCES = UnitTestMain.cpp AtomDescriptorTest.cpp AtomDescriptorTest.hpp
-AtomDescriptorTest_LDADD = ${ALLLIBS}
-
 BondGraphUnitTest_SOURCES = UnitTestMain.cpp bondgraphunittest.cpp bondgraphunittest.hpp
 BondGraphUnitTest_LDADD = ${ALLLIBS}
