Index: /code/branches/core6/test/CMakeLists.txt
===================================================================
--- /code/branches/core6/test/CMakeLists.txt	(revision 9600)
+++ /code/branches/core6/test/CMakeLists.txt	(revision 9601)
@@ -53,2 +53,3 @@
 
 ADD_SUBDIRECTORY(util)
+ADD_SUBDIRECTORY(core)
Index: /code/branches/core6/test/core/CMakeLists.txt
===================================================================
--- /code/branches/core6/test/core/CMakeLists.txt	(revision 9601)
+++ /code/branches/core6/test/core/CMakeLists.txt	(revision 9601)
@@ -0,0 +1,19 @@
+ORXONOX_ADD_EXECUTABLE(
+    core_test
+    EXCLUDE_FROM_ALL
+    NO_INSTALL
+  LINK_LIBRARIES
+    core
+    gmock_orxonox
+  SOURCE_FILES
+    ${GMOCK_MAIN}
+    class/IdentifiableTest.cc
+    class/IdentifierTest.cc
+    class/OrxonoxClassTest.cc
+    class/OrxonoxInterfaceTest.cc
+    class/SubclassIdentifierTest.cc
+    class/SuperTest.cc
+)
+ADD_DEPENDENCIES(test core_test)
+
+ADD_TEST(core_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/core_test --gtest_output=xml)
Index: /code/branches/core6/test/core/class/IdentifiableTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifiableTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/IdentifiableTest.cc	(revision 9601)
@@ -0,0 +1,34 @@
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class IdentifiableTest : public Identifiable
+        {
+            public:
+                IdentifiableTest() { RegisterRootObject(IdentifiableTest); }
+        };
+    }
+
+    TEST(IdentifiableTest, CanCreate)
+    {
+        IdentifiableTest* test = new IdentifiableTest();
+        ASSERT_TRUE(test != NULL);
+        delete test;
+    }
+
+    TEST(IdentifiableTest, HasIdentifierAssigned)
+    {
+        IdentifiableTest test;
+        EXPECT_TRUE(test.getIdentifier());
+    }
+
+    TEST(IdentifiableTest, CanBeIdentified)
+    {
+        IdentifiableTest test;
+        EXPECT_TRUE(test.isA(Class(IdentifiableTest)));
+    }
+}
Index: /code/branches/core6/test/core/class/IdentifierTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifierTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/IdentifierTest.cc	(revision 9601)
@@ -0,0 +1,53 @@
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestClass : public Identifiable
+        {
+            public:
+                TestClass() { RegisterRootObject(TestClass); }
+        };
+
+        class TestSubclass : public TestClass
+        {
+            public:
+                TestSubclass() { RegisterObject(TestSubclass); }
+        };
+    }
+
+    TEST(IdentifierTest, IdentifierExistsOfClass)
+    {
+        TestClass test;
+
+        Identifier* identifier = Class(TestClass);
+        EXPECT_TRUE(identifier != NULL);
+    }
+
+    TEST(IdentifierTest, IdentifierExistsOfSubclass)
+    {
+        TestSubclass test;
+
+        Identifier* identifier = Class(TestSubclass);
+        EXPECT_TRUE(identifier != NULL);
+    }
+
+    TEST(IdentifierTest, HasNameOfClass)
+    {
+        TestClass test;
+
+        Identifier* identifier = Class(TestClass);
+        EXPECT_EQ("TestClass", identifier->getName());
+    }
+
+    TEST(IdentifierTest, HasNameOfSubClass)
+    {
+        TestSubclass test;
+
+        Identifier* identifier = Class(TestSubclass);
+        EXPECT_EQ("TestSubclass", identifier->getName());
+    }
+}
Index: /code/branches/core6/test/core/class/OrxonoxClassTest.cc
===================================================================
--- /code/branches/core6/test/core/class/OrxonoxClassTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/OrxonoxClassTest.cc	(revision 9601)
@@ -0,0 +1,19 @@
+#include <gtest/gtest.h>
+#include "core/class/OrxonoxClass.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestClass : public OrxonoxClass
+        {
+        };
+    }
+
+    TEST(OrxonoxClassTest, CanCreate)
+    {
+        TestClass* test = new TestClass();
+        ASSERT_TRUE(test != NULL);
+        delete test;
+    }
+}
Index: /code/branches/core6/test/core/class/OrxonoxInterfaceTest.cc
===================================================================
--- /code/branches/core6/test/core/class/OrxonoxInterfaceTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/OrxonoxInterfaceTest.cc	(revision 9601)
@@ -0,0 +1,41 @@
+#include <gtest/gtest.h>
+#include "core/class/OrxonoxInterface.h"
+#include "core/class/OrxonoxClass.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class Interface1 : virtual public OrxonoxInterface
+        {
+        };
+        class Interface2 : virtual public OrxonoxInterface
+        {
+        };
+        class Interface3 : virtual public OrxonoxInterface
+        {
+        };
+
+        class TestClass1 : public Interface1, public Interface2, public Interface3
+        {
+        };
+
+        class TestClass2 : public OrxonoxClass, public Interface1, public Interface2, public Interface3
+        {
+        };
+    }
+
+    TEST(OrxonoxInterfaceTest, CanCreate1)
+    {
+        TestClass1* test = new TestClass1();
+        ASSERT_TRUE(test != NULL);
+        delete test;
+    }
+
+    TEST(OrxonoxInterfaceTest, CanCreate2)
+    {
+        TestClass2* test = new TestClass2();
+        ASSERT_TRUE(test != NULL);
+        delete test;
+    }
+}
Index: /code/branches/core6/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- /code/branches/core6/test/core/class/SubclassIdentifierTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/SubclassIdentifierTest.cc	(revision 9601)
@@ -0,0 +1,65 @@
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+#include "core/class/SubclassIdentifier.h"
+#include "core/class/OrxonoxClass.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestClass : public OrxonoxClass
+        {
+            public:
+                TestClass(BaseObject* creator = NULL) { RegisterRootObject(TestClass); }
+        };
+
+        class TestSubclass : public TestClass
+        {
+            public:
+                TestSubclass(BaseObject* creator = NULL) { RegisterObject(TestSubclass); }
+        };
+
+        CreateFactory(TestClass);
+        CreateFactory(TestSubclass);
+    }
+
+    TEST(SubclassIdentifierTest, CanCreateIdentifier)
+    {
+        TestSubclass test;
+
+        SubclassIdentifier<TestClass> subclassIdentifier;
+    }
+
+    TEST(SubclassIdentifierTest, DefaultsToNormalIdentifier)
+    {
+        TestSubclass test;
+
+        SubclassIdentifier<TestClass> subclassIdentifier;
+        EXPECT_EQ(Class(TestClass), subclassIdentifier.getIdentifier());
+    }
+
+    TEST(SubclassIdentifierTest, CanAssignIdentifierOfSubclass)
+    {
+        TestSubclass test;
+        IdentifierManager::createClassHierarchy();
+
+        SubclassIdentifier<TestClass> subclassIdentifier;
+        subclassIdentifier = Class(TestSubclass);
+        EXPECT_EQ(Class(TestSubclass), subclassIdentifier.getIdentifier());
+    }
+
+    TEST(SubclassIdentifierTest, CanCreateSubclass)
+    {
+        TestSubclass test;
+        IdentifierManager::createClassHierarchy();
+
+        SubclassIdentifier<TestClass> subclassIdentifier;
+        subclassIdentifier = Class(TestSubclass);
+
+        TestClass* instance = subclassIdentifier.fabricate(NULL);
+        ASSERT_TRUE(instance != NULL);
+        EXPECT_EQ(Class(TestSubclass), instance->getIdentifier());
+        delete instance;
+    }
+}
Index: /code/branches/core6/test/core/class/SuperTest.cc
===================================================================
--- /code/branches/core6/test/core/class/SuperTest.cc	(revision 9601)
+++ /code/branches/core6/test/core/class/SuperTest.cc	(revision 9601)
@@ -0,0 +1,100 @@
+#include <gtest/gtest.h>
+#include <tinyxml/tinyxml.h>
+
+#include "core/CoreIncludes.h"
+#include "core/BaseObject.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestClass : public BaseObject
+        {
+            public:
+                TestClass(BaseObject* creator = NULL) : BaseObject(NULL), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)
+                {
+                    RegisterRootObject(TestClass);
+                }
+
+                virtual void changedName()
+                {
+                    this->changedNameBase_ = true;
+                }
+
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode)
+                {
+                    this->xmlPortBase_ = true;
+                    this->modeBase_ = mode;
+                }
+
+                bool changedNameBase_;
+                bool xmlPortBase_;
+                XMLPort::Mode modeBase_;
+        };
+
+        class TestSubclass : public TestClass
+        {
+            public:
+                TestSubclass(BaseObject* creator = NULL) : changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)
+                {
+                    RegisterObject(TestSubclass);
+                }
+
+                virtual void changedName()
+                {
+                    this->changedNameSubclass_ = true;
+
+                    SUPER(TestSubclass, changedName);
+                }
+
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode)
+                {
+                    this->xmlPortSubclass_ = true;
+                    this->modeSubclass_ = mode;
+
+                    SUPER(TestSubclass, XMLPort, xmlelement, mode);
+                }
+
+                bool changedNameSubclass_;
+                bool xmlPortSubclass_;
+                XMLPort::Mode modeSubclass_;
+        };
+
+        CreateFactory(TestClass);
+        CreateFactory(TestSubclass);
+    }
+
+    TEST(SuberTest, SuperCallWithoutArguments)
+    {
+        TestSubclass test;
+        IdentifierManager::createClassHierarchy();
+
+        EXPECT_FALSE(test.changedNameBase_);
+        EXPECT_FALSE(test.changedNameSubclass_);
+
+        test.changedName();
+
+        EXPECT_TRUE(test.changedNameBase_);
+        EXPECT_TRUE(test.changedNameSubclass_);
+    }
+
+    TEST(SuberTest, SuperCallWithArguments)
+    {
+        TestSubclass test;
+        IdentifierManager::createClassHierarchy();
+
+        EXPECT_FALSE(test.xmlPortBase_);
+        EXPECT_FALSE(test.xmlPortSubclass_);
+        EXPECT_EQ(XMLPort::NOP, test.modeBase_);
+        EXPECT_EQ(XMLPort::NOP, test.modeSubclass_);
+
+        Element* element = NULL;
+        test.XMLPort(*element, XMLPort::SaveObject);
+
+        EXPECT_TRUE(test.xmlPortBase_);
+        EXPECT_TRUE(test.xmlPortSubclass_);
+        EXPECT_EQ(XMLPort::SaveObject, test.modeBase_);
+        EXPECT_EQ(XMLPort::SaveObject, test.modeSubclass_);
+    }
+}
