Index: src/Fragmentation/Containers/unittests/MPQCDataUnitTest.cpp
===================================================================
--- src/Fragmentation/Containers/unittests/MPQCDataUnitTest.cpp	(revision 8e84fee2b39a56651444a15cdef1d2ed8bad8999)
+++ src/Fragmentation/Containers/unittests/MPQCDataUnitTest.cpp	(revision 8e84fee2b39a56651444a15cdef1d2ed8bad8999)
@@ -0,0 +1,155 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * MPQCDataUnitTest.cpp
+ *
+ *  Created on: Feb 09, 2012
+ *      Author: heber
+ */
+
+// 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 headers that implement a archive in simple text format
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include <limits>
+#include <vector>
+
+#include "MPQCDataUnitTest.hpp"
+
+#include "Fragmentation/Containers/MPQCData.hpp"
+
+#include "CodePatterns/Assert.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( MPQCDataTest );
+
+
+void MPQCDataTest::setUp()
+{
+  // Throw assertions
+  ASSERT_DO(Assert::Throw);
+
+  data = new MPQCData;
+
+  data->energies.total = -37.3479855;
+  std::vector<double> force;
+  std::vector< std::vector<double> > forces;
+  force.push_back(-2.35);
+  force.push_back(-0.54);
+  force.push_back(0.345);
+  data->forces.push_back(force);
+  force.clear();
+  force.push_back(-2.35);
+  force.push_back(-0.54);
+  force.push_back(0.345);
+  data->forces.push_back( force );
+
+  CPPUNIT_ASSERT_EQUAL( (size_t)2, data->forces.size() );
+}
+
+
+void MPQCDataTest::tearDown()
+{
+  delete data;
+}
+
+/** UnitTest for operator==()
+ */
+void MPQCDataTest::operatorTest()
+{
+  MPQCData otherData;
+
+  // ascertain unequality
+  CPPUNIT_ASSERT( !(*data == otherData) );
+  CPPUNIT_ASSERT( *data != otherData );
+
+  // construct closer and closer pendant
+  otherData.energies.total = -37.3479855;
+  CPPUNIT_ASSERT( *data != otherData );
+  std::vector<double> force;
+  std::vector< std::vector<double> > forces;
+  force.push_back(-2.35);
+  force.push_back(-0.54);
+  force.push_back(0.345);
+  otherData.forces.push_back(force);
+  CPPUNIT_ASSERT( *data != otherData );
+  force.clear();
+  force.push_back(-2.35);
+  force.push_back(-0.54);
+  force.push_back(0.345);
+  otherData.forces.push_back( force );
+  CPPUNIT_ASSERT( *data == otherData );
+
+  // change energy
+  otherData.energies.total = -4;
+  CPPUNIT_ASSERT( *data != otherData );
+  otherData.energies.total = -37.3479855;
+  CPPUNIT_ASSERT( *data == otherData );
+
+  // change force component
+  otherData.forces[0][2] = -4;
+  CPPUNIT_ASSERT( *data != otherData );
+  otherData.forces[0][2] = 0.345;
+  CPPUNIT_ASSERT( *data == otherData );
+
+  // check sensibility
+  otherData.energies.total -= 1e-1*std::numeric_limits<double>::epsilon();
+  CPPUNIT_ASSERT( *data == otherData );
+  otherData.forces[1][0] -= 1e-1*std::numeric_limits<double>::epsilon();
+  CPPUNIT_ASSERT( *data == otherData );
+}
+
+/** UnitTest for serialization
+ */
+void MPQCDataTest::serializationTest()
+{
+  // serialize
+  std::stringstream outputstream;
+  boost::archive::text_oarchive oa(outputstream);
+  oa << data;
+
+  // deserialize
+  MPQCData *extractedData;
+  std::stringstream returnstream(outputstream.str());
+  boost::archive::text_iarchive ia(returnstream);
+  ia >> extractedData;
+
+  CPPUNIT_ASSERT( *data == *extractedData );
+
+  delete extractedData;
+}
