Index: /code/branches/core6/test/core/CMakeLists.txt
===================================================================
--- /code/branches/core6/test/core/CMakeLists.txt	(revision 9635)
+++ /code/branches/core6/test/core/CMakeLists.txt	(revision 9636)
@@ -10,4 +10,6 @@
     class/IdentifiableTest.cc
     class/IdentifierTest.cc
+    class/IdentifierSimpleClassHierarchyTest.cc
+    class/IdentifierExternalClassHierarchyTest.cc
     class/OrxonoxClassTest.cc
     class/OrxonoxInterfaceTest.cc
Index: /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 9636)
+++ /code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 9636)
@@ -0,0 +1,79 @@
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class Interface : virtual public Identifiable
+            { public: Interface() { RegisterRootObject(Interface); } };
+
+        class BaseClass : virtual public Identifiable
+            { public: BaseClass() { RegisterRootObject(BaseClass); } };
+
+        class RealClass : public BaseClass, public Interface
+            { public: RealClass() { RegisterObject(RealClass); } };
+
+        // Fixture
+        class IdentifierExternalClassHierarchyTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp()
+                {
+                    new ClassFactory<Interface>("Interface");
+                    new ClassFactory<BaseClass>("BaseClass");
+                    new ClassFactory<RealClass>("RealClass");
+                    IdentifierManager::createClassHierarchy();
+                }
+
+                virtual void TearDown()
+                {
+                    IdentifierManager::destroyAllIdentifiers();
+                }
+        };
+    }
+
+    TEST(IdentifierExternalClassHierarchyTest_NoFixture, NoInitialization)
+    {
+        {
+            Identifier* identifier = Class(Interface);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(RealClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+    }
+
+    TEST_F(IdentifierExternalClassHierarchyTest, TestInterface)
+    {
+        Identifier* identifier = Class(Interface);
+
+        EXPECT_EQ(1u, identifier->getChildren().size());
+        EXPECT_EQ(0u, identifier->getParents().size());
+    }
+
+    TEST_F(IdentifierExternalClassHierarchyTest, BaseClass)
+    {
+        Identifier* identifier = Class(BaseClass);
+
+        EXPECT_EQ(1u, identifier->getChildren().size());
+        EXPECT_EQ(0u, identifier->getParents().size());
+    }
+
+    TEST_F(IdentifierExternalClassHierarchyTest, RealClass)
+    {
+        Identifier* identifier = Class(RealClass);
+
+        EXPECT_EQ(0u, identifier->getChildren().size());
+        EXPECT_EQ(2u, identifier->getParents().size());
+    }
+}
Index: /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 9636)
+++ /code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 9636)
@@ -0,0 +1,81 @@
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+#include "core/class/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class Interface : public OrxonoxInterface
+            { public: Interface() { RegisterRootObject(Interface); } };
+
+        class BaseClass : public OrxonoxClass
+            { public: BaseClass() { RegisterRootObject(BaseClass); } };
+
+        class RealClass : public BaseClass, public Interface
+            { public: RealClass() { RegisterObject(RealClass); } };
+
+        // Fixture
+        class IdentifierSimpleClassHierarchyTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp()
+                {
+                    new ClassFactory<Interface>("Interface");
+                    new ClassFactory<BaseClass>("BaseClass");
+                    new ClassFactory<RealClass>("RealClass");
+                    IdentifierManager::createClassHierarchy();
+                }
+
+                virtual void TearDown()
+                {
+                    IdentifierManager::destroyAllIdentifiers();
+                }
+        };
+    }
+
+    TEST(IdentifierSimpleClassHierarchyTest_NoFixture, NoInitialization)
+    {
+        {
+            Identifier* identifier = Class(Interface);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(RealClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+    }
+
+    TEST_F(IdentifierSimpleClassHierarchyTest, TestInterface)
+    {
+        Identifier* identifier = Class(Interface);
+
+        EXPECT_EQ(1u, identifier->getChildren().size());
+        EXPECT_EQ(0u, identifier->getParents().size());
+    }
+
+    TEST_F(IdentifierSimpleClassHierarchyTest, BaseClass)
+    {
+        Identifier* identifier = Class(BaseClass);
+
+        EXPECT_EQ(1u, identifier->getChildren().size());
+        EXPECT_EQ(0u, identifier->getParents().size());
+    }
+
+    TEST_F(IdentifierSimpleClassHierarchyTest, RealClass)
+    {
+        Identifier* identifier = Class(RealClass);
+
+        EXPECT_EQ(0u, identifier->getChildren().size());
+        EXPECT_EQ(2u, identifier->getParents().size());
+    }
+}
