Index: src/Actions/unittests/Makefile.am
===================================================================
--- src/Actions/unittests/Makefile.am	(revision 4076fcc9b9d836715dfe1bba1c9247bfdd385a93)
+++ src/Actions/unittests/Makefile.am	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -11,5 +11,6 @@
   ActionRegistryUnitTest \
   ActionSequenceUnitTest \
-  AtomsCalculationUnitTest
+  AtomsCalculationUnitTest \
+  ManipulateAtomsUnitTest
 
 check_PROGRAMS = $(TESTS) 
@@ -48,4 +49,10 @@
 AtomsCalculationUnitTest_LDADD = ${ALLLIBS}
 
+ManipulateAtomsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	ManipulateAtomsUnitTest.cpp \
+	ManipulateAtomsUnitTest.hpp
+ManipulateAtomsUnitTest_LDADD = ${ALLLIBS}
+
+
 
 #AUTOMAKE_OPTIONS = parallel-tests
Index: src/Actions/unittests/ManipulateAtomsUnitTest.cpp
===================================================================
--- src/Actions/unittests/ManipulateAtomsUnitTest.cpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
+++ src/Actions/unittests/ManipulateAtomsUnitTest.cpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -0,0 +1,159 @@
+/*
+ * 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.
+ */
+
+/*
+ * manipulateAtomsTest.cpp
+ *
+ *  Created on: Feb 18, 2010
+ *      Author: crueger
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <iostream>
+#include <boost/bind.hpp>
+
+#include "Descriptors/AtomDescriptor.hpp"
+#include "Descriptors/AtomIdDescriptor.hpp"
+#include "Actions/ManipulateAtomsProcess.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Actions/ActionHistory.hpp"
+
+#include "World.hpp"
+#include "atom.hpp"
+
+#include "unittests/DummyUI.hpp"
+
+#include "ManipulateAtomsUnitTest.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( manipulateAtomsTest );
+
+// some stubs
+class AtomStub : public atom {
+public:
+  AtomStub(int _id) :
+  atom(),
+  manipulated(false),
+  id(_id)
+  {}
+
+  virtual atomId_t getId(){
+    return id;
+  }
+
+  virtual void doSomething(){
+    manipulated = true;
+  }
+
+  bool manipulated;
+private:
+  atomId_t id;
+};
+
+class countObserver : public Observer{
+public:
+  countObserver() :
+    Observer("countObserver"),
+    count(0)
+    {}
+  virtual ~countObserver(){}
+
+  void update(Observable *){
+    count++;
+  }
+
+  void subjectKilled(Observable *)
+  {}
+
+  int count;
+};
+
+// set up and tear down
+void manipulateAtomsTest::setUp(){
+  hasDescriptor = false;
+  ActionHistory::init();
+  World::getInstance();
+  // TODO: find a way to really reset the factory to a clean state in tear-down
+  if(!hasDescriptor){
+    UIFactory::registerFactory(new DummyUIFactory::description());
+    hasDescriptor = true;
+  }
+  UIFactory::makeUserInterface("Dummy");
+  for(int i=0;i<ATOM_COUNT;++i){
+    atoms[i]= new AtomStub(i);
+    World::getInstance().registerAtom(atoms[i]);
+  }
+}
+void manipulateAtomsTest::tearDown(){
+  World::purgeInstance();
+  ActionRegistry::purgeInstance();
+  ActionHistory::purgeInstance();
+  {
+    UIFactory::purgeInstance();
+    hasDescriptor = false;
+  }
+}
+
+static void operation(atom* _atom){
+  AtomStub *atom = dynamic_cast<AtomStub*>(_atom);
+  CPPUNIT_ASSERT(atom);
+  atom->doSomething();
+}
+
+
+void manipulateAtomsTest::testManipulateSimple(){
+  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms());
+  proc->call();
+  std::vector<atom*> allAtoms = World::getInstance().getAllAtoms(AllAtoms());
+  std::vector<atom*>::iterator iter;
+  for(iter=allAtoms.begin();iter!=allAtoms.end();++iter){
+    AtomStub *atom;
+    atom = dynamic_cast<AtomStub*>(*iter);
+    CPPUNIT_ASSERT(atom);
+    CPPUNIT_ASSERT(atom->manipulated);
+  }
+}
+
+void manipulateAtomsTest::testManipulateExcluded(){
+
+  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms() && !AtomById(ATOM_COUNT/2));
+  proc->call();
+  std::vector<atom*> allAtoms = World::getInstance().getAllAtoms(AllAtoms());
+  std::vector<atom*>::iterator iter;
+  for(iter=allAtoms.begin();iter!=allAtoms.end();++iter){
+    AtomStub *atom;
+    atom = dynamic_cast<AtomStub*>(*iter);
+    CPPUNIT_ASSERT(atom);
+    if(atom->getId()!=(int)ATOM_COUNT/2)
+      CPPUNIT_ASSERT(atom->manipulated);
+    else
+      CPPUNIT_ASSERT(!atom->manipulated);
+  }
+}
+
+void manipulateAtomsTest::testObserver(){
+  countObserver *obs = new countObserver();
+  World::getInstance().signOn(obs);
+  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms());
+  proc->call();
+
+  CPPUNIT_ASSERT_EQUAL(1,obs->count);
+  World::getInstance().signOff(obs);
+  delete obs;
+}
Index: src/Actions/unittests/ManipulateAtomsUnitTest.hpp
===================================================================
--- src/Actions/unittests/ManipulateAtomsUnitTest.hpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
+++ src/Actions/unittests/ManipulateAtomsUnitTest.hpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -0,0 +1,39 @@
+/*
+ * manipulateAtomsTest.hpp
+ *
+ *  Created on: Feb 18, 2010
+ *      Author: crueger
+ */
+
+#ifndef MANIPULATEATOMSTEST_HPP_
+#define MANIPULATEATOMSTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+// we prefer enum over define
+enum { ATOM_COUNT = 10 };
+
+class atom;
+
+class manipulateAtomsTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( manipulateAtomsTest );
+  CPPUNIT_TEST ( testManipulateSimple );
+  CPPUNIT_TEST ( testManipulateExcluded );
+  CPPUNIT_TEST ( testObserver );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void testManipulateSimple();
+  void testManipulateExcluded();
+  void testObserver();
+
+private:
+  atom *atoms [ATOM_COUNT];
+  bool hasDescriptor;
+};
+
+#endif /* MANIPULATEATOMSTEST_HPP_ */
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 4076fcc9b9d836715dfe1bba1c9247bfdd385a93)
+++ src/unittests/Makefile.am	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -27,5 +27,4 @@
   LinkedCellUnitTest \
   ListOfBondsUnitTest \
-  manipulateAtomsTest \
   MenuDescriptionUnitTest \
   MoleculeDescriptorTest \
@@ -84,8 +83,8 @@
   listofbondsunittest.cpp \
   ../Helpers/unittests/LogUnitTest.cpp \
+  ../Actions/unittests/ManipulateAtomsUnitTest.cpp \
   ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.cpp \
   ../LinearAlgebra/unittests/MatrixContentUnitTest.cpp \
   ../LinearAlgebra/unittests/MatrixUnitTest.cpp \
-  manipulateAtomsTest.cpp \
   MenuDescriptionUnitTest.cpp \
   MoleculeDescriptorTest.cpp \
@@ -124,5 +123,5 @@
   listofbondsunittest.hpp \
   ../Helpers/unittests/LogUnitTest.hpp \
-  manipulateAtomsTest.hpp \
+  ../Actions/unittests/ManipulateAtomsUnitTest.hpp \
   ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.hpp \
   ../LinearAlgebra/unittests/MatrixContentUnitTest.hpp \
@@ -179,7 +178,4 @@
 ListOfBondsUnitTest_LDADD = ${ALLLIBS}
 
-manipulateAtomsTest_SOURCES = UnitTestMain.cpp manipulateAtomsTest.cpp manipulateAtomsTest.hpp
-manipulateAtomsTest_LDADD = ${UILIBS} ${ALLLIBS}
-
 MenuDescriptionUnitTest_SOURCES = UnitTestMain.cpp MenuDescriptionUnitTest.cpp   MenuDescriptionUnitTest.hpp
 MenuDescriptionUnitTest_LDADD = ${ALLLIBS}
Index: src/unittests/manipulateAtomsTest.cpp
===================================================================
--- src/unittests/manipulateAtomsTest.cpp	(revision 4076fcc9b9d836715dfe1bba1c9247bfdd385a93)
+++ 	(revision )
@@ -1,158 +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.
- */
-
-/*
- * manipulateAtomsTest.cpp
- *
- *  Created on: Feb 18, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "manipulateAtomsTest.hpp"
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-#include <iostream>
-#include <boost/bind.hpp>
-
-#include "Descriptors/AtomDescriptor.hpp"
-#include "Descriptors/AtomIdDescriptor.hpp"
-#include "Actions/ManipulateAtomsProcess.hpp"
-#include "Actions/ActionRegistry.hpp"
-#include "Actions/ActionHistory.hpp"
-
-#include "World.hpp"
-#include "atom.hpp"
-
-#include "DummyUI.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( manipulateAtomsTest );
-
-// some stubs
-class AtomStub : public atom {
-public:
-  AtomStub(int _id) :
-  atom(),
-  manipulated(false),
-  id(_id)
-  {}
-
-  virtual atomId_t getId(){
-    return id;
-  }
-
-  virtual void doSomething(){
-    manipulated = true;
-  }
-
-  bool manipulated;
-private:
-  atomId_t id;
-};
-
-class countObserver : public Observer{
-public:
-  countObserver() :
-    Observer("countObserver"),
-    count(0)
-    {}
-  virtual ~countObserver(){}
-
-  void update(Observable *){
-    count++;
-  }
-
-  void subjectKilled(Observable *)
-  {}
-
-  int count;
-};
-
-// set up and tear down
-void manipulateAtomsTest::setUp(){
-  hasDescriptor = false;
-  ActionHistory::init();
-  World::getInstance();
-  // TODO: find a way to really reset the factory to a clean state in tear-down
-  if(!hasDescriptor){
-    UIFactory::registerFactory(new DummyUIFactory::description());
-    hasDescriptor = true;
-  }
-  UIFactory::makeUserInterface("Dummy");
-  for(int i=0;i<ATOM_COUNT;++i){
-    atoms[i]= new AtomStub(i);
-    World::getInstance().registerAtom(atoms[i]);
-  }
-}
-void manipulateAtomsTest::tearDown(){
-  World::purgeInstance();
-  ActionRegistry::purgeInstance();
-  ActionHistory::purgeInstance();
-  {
-    UIFactory::purgeInstance();
-    hasDescriptor = false;
-  }
-}
-
-static void operation(atom* _atom){
-  AtomStub *atom = dynamic_cast<AtomStub*>(_atom);
-  CPPUNIT_ASSERT(atom);
-  atom->doSomething();
-}
-
-
-void manipulateAtomsTest::testManipulateSimple(){
-  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms());
-  proc->call();
-  std::vector<atom*> allAtoms = World::getInstance().getAllAtoms(AllAtoms());
-  std::vector<atom*>::iterator iter;
-  for(iter=allAtoms.begin();iter!=allAtoms.end();++iter){
-    AtomStub *atom;
-    atom = dynamic_cast<AtomStub*>(*iter);
-    CPPUNIT_ASSERT(atom);
-    CPPUNIT_ASSERT(atom->manipulated);
-  }
-}
-
-void manipulateAtomsTest::testManipulateExcluded(){
-
-  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms() && !AtomById(ATOM_COUNT/2));
-  proc->call();
-  std::vector<atom*> allAtoms = World::getInstance().getAllAtoms(AllAtoms());
-  std::vector<atom*>::iterator iter;
-  for(iter=allAtoms.begin();iter!=allAtoms.end();++iter){
-    AtomStub *atom;
-    atom = dynamic_cast<AtomStub*>(*iter);
-    CPPUNIT_ASSERT(atom);
-    if(atom->getId()!=(int)ATOM_COUNT/2)
-      CPPUNIT_ASSERT(atom->manipulated);
-    else
-      CPPUNIT_ASSERT(!atom->manipulated);
-  }
-}
-
-void manipulateAtomsTest::testObserver(){
-  countObserver *obs = new countObserver();
-  World::getInstance().signOn(obs);
-  ManipulateAtomsProcess *proc = World::getInstance().manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms());
-  proc->call();
-
-  CPPUNIT_ASSERT_EQUAL(1,obs->count);
-  World::getInstance().signOff(obs);
-  delete obs;
-}
Index: src/unittests/manipulateAtomsTest.hpp
===================================================================
--- src/unittests/manipulateAtomsTest.hpp	(revision 4076fcc9b9d836715dfe1bba1c9247bfdd385a93)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- * manipulateAtomsTest.hpp
- *
- *  Created on: Feb 18, 2010
- *      Author: crueger
- */
-
-#ifndef MANIPULATEATOMSTEST_HPP_
-#define MANIPULATEATOMSTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-// we prefer enum over define
-enum { ATOM_COUNT = 10 };
-
-class atom;
-
-class manipulateAtomsTest : public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( manipulateAtomsTest );
-  CPPUNIT_TEST ( testManipulateSimple );
-  CPPUNIT_TEST ( testManipulateExcluded );
-  CPPUNIT_TEST ( testObserver );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void testManipulateSimple();
-  void testManipulateExcluded();
-  void testObserver();
-
-private:
-  atom *atoms [ATOM_COUNT];
-  bool hasDescriptor;
-};
-
-#endif /* MANIPULATEATOMSTEST_HPP_ */
