updated DBUSCommunicator unit tests to reflect Command refactoring.
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Thu, 1 Dec 2011 08:54:36 +0000 (09:54 +0100)
committerMichael Schuldt <michael.schuldt@bmw-carit.de>
Mon, 5 Dec 2011 07:35:17 +0000 (08:35 +0100)
45 files changed:
LayerManagerCommands/include/LayerCreateCommand.h
LayerManagerCommands/include/LayerGetDimensionCommand.h
LayerManagerCommands/include/LayerGetOpacityCommand.h
LayerManagerCommands/include/LayerGetVisibilityCommand.h
LayerManagerCommands/include/LayerRemoveCommand.h
LayerManagerCommands/include/LayerSetDestinationRectangleCommand.h
LayerManagerCommands/include/LayerSetDimensionCommand.h
LayerManagerCommands/include/LayerSetOpacityCommand.h
LayerManagerCommands/include/LayerSetOrientationCommand.h
LayerManagerCommands/include/LayerSetPositionCommand.h
LayerManagerCommands/include/LayerSetSourceRectangleCommand.h
LayerManagerCommands/include/LayerSetVisibilityCommand.h
LayerManagerCommands/include/LayergroupCreateCommand.h
LayerManagerCommands/include/LayergroupGetOpacityCommand.h
LayerManagerCommands/include/LayergroupGetVisibilityCommand.h
LayerManagerCommands/include/LayergroupRemoveCommand.h
LayerManagerCommands/include/LayergroupSetOpacityCommand.h
LayerManagerCommands/include/LayergroupSetVisibilityCommand.h
LayerManagerCommands/include/SurfaceCreateCommand.h
LayerManagerCommands/include/SurfaceGetDimensionCommand.h
LayerManagerCommands/include/SurfaceGetOpacityCommand.h
LayerManagerCommands/include/SurfaceGetPixelformatCommand.h
LayerManagerCommands/include/SurfaceGetVisibilityCommand.h
LayerManagerCommands/include/SurfaceRemoveCommand.h
LayerManagerCommands/include/SurfaceSetDestinationRectangleCommand.h
LayerManagerCommands/include/SurfaceSetDimensionCommand.h
LayerManagerCommands/include/SurfaceSetOpacityCommand.h
LayerManagerCommands/include/SurfaceSetOrientationCommand.h
LayerManagerCommands/include/SurfaceSetPositionCommand.h
LayerManagerCommands/include/SurfaceSetSourceRectangleCommand.h
LayerManagerCommands/include/SurfaceSetVisibilityCommand.h
LayerManagerCommands/include/SurfacegroupCreateCommand.h
LayerManagerCommands/include/SurfacegroupGetOpacityCommand.h
LayerManagerCommands/include/SurfacegroupGetVisibilityCommand.h
LayerManagerCommands/include/SurfacegroupRemoveCommand.h
LayerManagerCommands/include/SurfacegroupSetOpacityCommand.h
LayerManagerCommands/include/SurfacegroupSetVisibilityCommand.h
LayerManagerPlugins/Communicators/DBUSCommunicator/CMakeLists.txt
LayerManagerPlugins/Communicators/DBUSCommunicator/test/CMakeLists.txt
LayerManagerPlugins/Communicators/DBUSCommunicator/test/DBUSCommunicatorTest.cpp
LayerManagerService/CMakeLists.txt
LayerManagerService/include/GraphicalObject.h
LayerManagerService/include/GraphicalSurface.h
LayerManagerService/include/Layer.h
LayerManagerService/include/Scene.h

index c056fde..92bf9ee 100644 (file)
@@ -36,7 +36,7 @@ private:
     uint* m_idReturn;
 
     // for unit testing
-    //template <typename nativeHandle_type, typename OriginalWidth_type, typename OriginalHeight_type, typename createType_type, typename pixelformat_type> friend class CreateCommandEqMatcherP5;
+    template <typename OriginalWidth_type, typename OriginalHeight_type> friend class LayerCreateCommandEqMatcherP2;
 };
 
 
index c2268d2..133659e 100644 (file)
@@ -36,7 +36,7 @@ private:
     unsigned int* m_pHeight;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetDimensionCommandEqMatcherP2;
+    template <typename id_type> friend class LayerGetDimensionCommandEqMatcherP;
 };
 
 #endif /* _LAYERGETDIMENSIONCOMMAND_H_ */
index f560793..db6366c 100644 (file)
@@ -36,7 +36,7 @@ private:
     double* m_pReturnOpacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetOpacityCommandEqMatcherP2;
+    template <typename id_type> friend class LayerGetOpacityCommandEqMatcherP;
 };
 
 
index a523644..1d5d1db 100644 (file)
@@ -35,7 +35,7 @@ private:
     bool* m_pVisibility;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetVisibilityCommandEqMatcherP2;
+    template <typename id_type> friend class LayerGetVisibilityCommandEqMatcherP;
 };
 
 
index e94638a..7bd0b04 100644 (file)
@@ -34,7 +34,7 @@ private:
     const unsigned int m_idToRemove;
 
     // for unit testing
-    //template<typename idToRemove_type, typename typeToRemove_type> friend class RemoveCommandEqMatcherP2;
+    template<typename idToRemove_type> friend class LayerRemoveCommandEqMatcherP;
 };
 
 #endif /* _LAYERREMOVECOMMAND_H_ */
index 83df6f4..c4e00ec 100644 (file)
@@ -38,7 +38,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SetDestinationRectangleCommandEqMatcherP6;
+    template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class LayerSetDestinationRectangleCommandEqMatcherP5;
 };
 
 
index 29db225..1a17ebe 100644 (file)
@@ -25,7 +25,7 @@
 class LayerSetDimensionCommand : public BaseCommandAsynchronous
 {
 public:
-       LayerSetDimensionCommand(int id, unsigned int width,unsigned  int height);
+       LayerSetDimensionCommand(int id, unsigned int width, unsigned  int height);
 
     virtual ExecutionResult execute(ICommandExecutor* executor);
     virtual const std::string getString();
@@ -36,7 +36,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename width_type, typename height_type> friend class SetDimensionCommandEqMatcherP4;
+    template <typename id_type, typename width_type, typename height_type> friend class LayerSetDimensionCommandEqMatcherP3;
 };
 
 
index bc1fc3a..ba24af0 100644 (file)
@@ -35,7 +35,7 @@ private:
     const double m_opacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Opacity_type> friend class SetOpacityCommandEqMatcherP3;
+    template <typename id_type, typename Opacity_type> friend class LayerSetOpacityCommandEqMatcherP2;
 };
 
 
index a53febe..f9cfb15 100644 (file)
@@ -36,7 +36,7 @@ private:
     const OrientationType m_orientation;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Orientation_type> friend class SetOrientationCommandEqMatcherP3;
+    template <typename id_type, typename Orientation_type> friend class LayerSetOrientationCommandEqMatcherP2;
 };
 
 
index cfdfee5..8b4a690 100644 (file)
@@ -36,7 +36,7 @@ private:
     const unsigned int m_y;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type> friend class SetPositionCommandEqMatcherP4;
+    template <typename id_type, typename x_type, typename y_type> friend class LayerSetPositionCommandEqMatcherP3;
 };
 
 
index bcdf84a..85b9209 100644 (file)
@@ -38,7 +38,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SetSourceRectangleCommandEqMatcherP6;
+    template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class LayerSetSourceRectangleCommandEqMatcherP5;
 };
 
 
index 2ccc3db..a3d890e 100644 (file)
@@ -35,7 +35,7 @@ private:
     const bool m_visibility;
 
     // for unit testing
-    //template <typename id_type, typename otype_type, typename visibility_type> friend class SetVisibilityCommandEqMatcherP3;
+    template <typename id_type, typename visibility_type> friend class LayerSetVisibilityCommandEqMatcherP2;
 };
 
 
index aeb0eb2..cecd9a9 100644 (file)
@@ -32,9 +32,6 @@ public:
 
 private:
     uint* m_idReturn;
-
-    // for unit testing
-    //template <typename nativeHandle_type, typename OriginalWidth_type, typename OriginalHeight_type, typename createType_type, typename pixelformat_type> friend class CreateCommandEqMatcherP5;
 };
 
 
index 766a9ce..2c72f25 100644 (file)
@@ -36,7 +36,7 @@ private:
     double* m_pReturnOpacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetOpacityCommandEqMatcherP2;
+    template <typename id_type> friend class LayergroupGetOpacityCommandEqMatcherP;
 };
 
 
index b7cad69..1fc25cb 100644 (file)
@@ -35,7 +35,7 @@ private:
     bool* m_pVisibility;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetVisibilityCommandEqMatcherP2;
+    template <typename id_type> friend class LayergroupGetVisibilityCommandEqMatcherP;
 };
 
 
index 1695896..ad3a8c4 100644 (file)
@@ -34,7 +34,7 @@ private:
     const unsigned int m_idToRemove;
 
     // for unit testing
-    //template<typename idToRemove_type, typename typeToRemove_type> friend class RemoveCommandEqMatcherP2;
+    template<typename idToRemove_type> friend class LayergroupRemoveCommandEqMatcherP;
 };
 
 #endif /* _LAYERGROUPREMOVECOMMAND_H_ */
index 6ff0f76..e6914d4 100644 (file)
@@ -35,7 +35,7 @@ private:
     const double m_opacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Opacity_type> friend class SetOpacityCommandEqMatcherP3;
+    template <typename id_type, typename Opacity_type> friend class LayergroupSetOpacityCommandEqMatcherP2;
 };
 
 
index 0fee0f5..95dd5e9 100644 (file)
@@ -35,7 +35,7 @@ private:
     const bool m_visibility;
 
     // for unit testing
-    //template <typename id_type, typename otype_type, typename visibility_type> friend class SetVisibilityCommandEqMatcherP3;
+    template <typename id_type, typename visibility_type> friend class LayergroupSetVisibilityCommandEqMatcherP2;
 };
 
 
index 05e5912..c92c140 100644 (file)
@@ -39,7 +39,7 @@ private:
     uint* m_idReturn;
 
     // for unit testing
-    //template <typename nativeHandle_type, typename OriginalWidth_type, typename OriginalHeight_type, typename createType_type, typename pixelformat_type> friend class CreateCommandEqMatcherP5;
+    template <typename nativeHandle_type, typename pixelformat_type, typename OriginalWidth_type, typename OriginalHeight_type> friend class SurfaceCreateCommandEqMatcherP4;
 };
 
 
index 99b8e04..c66ea06 100644 (file)
@@ -36,7 +36,7 @@ private:
     unsigned int* m_pHeight;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetDimensionCommandEqMatcherP2;
+    template <typename id_type> friend class SurfaceGetDimensionCommandEqMatcherP;
 };
 
 #endif /* _SURFACEGETDIMENSIONCOMMAND_H_ */
index 9691609..4f23dfc 100644 (file)
@@ -36,7 +36,7 @@ private:
     double* m_pReturnOpacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetOpacityCommandEqMatcherP2;
+    template <typename id_type> friend class SurfaceGetOpacityCommandEqMatcherP;
 };
 
 
index ca99536..4b616a8 100644 (file)
@@ -36,7 +36,7 @@ private:
     PixelFormat* m_pFormatreturn;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetPixelformatCommandEqMatcherP2;
+    template <typename id_type> friend class SurfaceGetPixelformatCommandEqMatcherP;
 };
 
 #endif /* _SURFACEGETPIXELFORMATCOMMAND_H_ */
index 030bdf8..9c398d5 100644 (file)
@@ -35,7 +35,7 @@ private:
     bool* m_pVisibility;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetVisibilityCommandEqMatcherP2;
+    template <typename id_type> friend class SurfaceGetVisibilityCommandEqMatcherP;
 };
 
 
index 8a727d1..4a9afea 100644 (file)
@@ -34,7 +34,7 @@ private:
     const unsigned int m_idToRemove;
 
     // for unit testing
-    //template<typename idToRemove_type, typename typeToRemove_type> friend class RemoveCommandEqMatcherP2;
+    template<typename idToRemove_type> friend class SurfaceRemoveCommandEqMatcherP;
 };
 
 #endif /* _SURFACEREMOVECOMMAND_H_ */
index eb6859e..557c913 100644 (file)
@@ -38,7 +38,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SetDestinationRectangleCommandEqMatcherP6;
+    template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SurfaceSetDestinationRectangleCommandEqMatcherP5;
 };
 
 
index 7949fb3..c32d84f 100644 (file)
@@ -36,7 +36,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename width_type, typename height_type> friend class SetDimensionCommandEqMatcherP4;
+    template <typename id_type, typename width_type, typename height_type> friend class SurfaceSetDimensionCommandEqMatcherP3;
 };
 
 
index f6cd8ea..27ed7cc 100644 (file)
@@ -35,7 +35,7 @@ private:
     const double m_opacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Opacity_type> friend class SetOpacityCommandEqMatcherP3;
+    template <typename id_type, typename Opacity_type> friend class SurfaceSetOpacityCommandEqMatcherP2;
 };
 
 
index 9e0a17b..f22a5f7 100644 (file)
@@ -36,7 +36,7 @@ private:
     const OrientationType m_orientation;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Orientation_type> friend class SetOrientationCommandEqMatcherP3;
+    template <typename id_type, typename Orientation_type> friend class SurfaceSetOrientationCommandEqMatcherP2;
 };
 
 
index 30e7d76..71233a1 100644 (file)
@@ -36,7 +36,7 @@ private:
     const unsigned int m_y;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type> friend class SetPositionCommandEqMatcherP4;
+    template <typename id_type, typename x_type, typename y_type> friend class SurfaceSetPositionCommandEqMatcherP3;
 };
 
 
index b659eb6..353bdd7 100644 (file)
@@ -38,7 +38,7 @@ private:
     const unsigned int m_height;
 
     // for unit testing
-    //template <typename id_type, typename typeToSet_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SetSourceRectangleCommandEqMatcherP6;
+    template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SurfaceSetSourceRectangleCommandEqMatcherP5;
 };
 
 
index 144d7c4..67dc69d 100644 (file)
@@ -35,8 +35,7 @@ private:
     const bool m_visibility;
 
     // for unit testing
-    //template <typename id_type, typename otype_type, typename visibility_type> friend class SetVisibilityCommandEqMatcherP3;
+    template <typename id_type, typename visibility_type> friend class SurfaceSetVisibilityCommandEqMatcherP2;
 };
 
-
 #endif /* _SURFACESETVISIBILITYCOMMAND_H_ */
index b4dcda6..3bdc828 100644 (file)
@@ -32,9 +32,6 @@ public:
 
 private:
     uint* m_idReturn;
-
-    // for unit testing
-    //template <typename nativeHandle_type, typename OriginalWidth_type, typename OriginalHeight_type, typename createType_type, typename pixelformat_type> friend class CreateCommandEqMatcherP5;
 };
 
 
index 300a85f..c02b2b9 100644 (file)
@@ -36,7 +36,7 @@ private:
     double* m_pReturnOpacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetOpacityCommandEqMatcherP2;
+    template <typename id_type> friend class SurfacegroupGetOpacityCommandEqMatcherP;
 };
 
 
index 50d3f34..1763a2d 100644 (file)
@@ -35,7 +35,7 @@ private:
     bool* m_pVisibility;
 
     // for unit testing
-    //template <typename id_type, typename type_type> friend class GetVisibilityCommandEqMatcherP2;
+    template <typename id_type> friend class SurfacegroupGetVisibilityCommandEqMatcherP;
 };
 
 
index 16934fe..6889b07 100644 (file)
@@ -34,7 +34,7 @@ private:
     const unsigned int m_idToRemove;
 
     // for unit testing
-    //template<typename idToRemove_type, typename typeToRemove_type> friend class RemoveCommandEqMatcherP2;
+    template<typename idToRemove_type> friend class SurfacegroupRemoveCommandEqMatcherP;
 };
 
 #endif /* _SURFACEGROUPREMOVECOMMAND_H_ */
index cc39ed7..e6d4324 100644 (file)
@@ -35,7 +35,7 @@ private:
     const double m_opacity;
 
     // for unit testing
-    //template <typename id_type, typename type_type, typename Opacity_type> friend class SetOpacityCommandEqMatcherP3;
+    template <typename id_type, typename Opacity_type> friend class SurfacegroupSetOpacityCommandEqMatcherP2;
 };
 
 
index f3d2608..de06c2c 100644 (file)
@@ -35,7 +35,7 @@ private:
     const bool m_visibility;
 
     // for unit testing
-    //template <typename id_type, typename otype_type, typename visibility_type> friend class SetVisibilityCommandEqMatcherP3;
+    template <typename id_type, typename visibility_type> friend class SurfacegroupSetVisibilityCommandEqMatcherP2;
 };
 
 
index 23f5550..74a40f2 100644 (file)
@@ -49,8 +49,8 @@ install (FILES include/LayerManagerService.conf DESTINATION /etc/dbus-1/system.d
 install (FILES include/LayerManagerService.conf DESTINATION /etc/dbus-1/session.d)
 
 
-#if (WITH_TESTS)
-#enable_testing()
-#add_subdirectory (test)
-#endif(WITH_TESTS)
+if (WITH_TESTS)
+enable_testing()
+add_subdirectory (test)
+endif(WITH_TESTS)
 
index 65c77e2..bc40185 100644 (file)
@@ -35,7 +35,7 @@ set(LIBS ${LIBS} ${DBUS_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} LayerManagerUtils)
 
 file(GLOB LM_SOURCES "${PROJECT_SOURCE_DIR}/LayerManagerService/src/Scene.cpp"
                      "${PROJECT_SOURCE_DIR}/LayerManagerService/src/Layermanager.cpp"
-                     "${PROJECT_SOURCE_DIR}/LayerManagerService/src/LogicalGraphicsObject.cpp"
+                     "${PROJECT_SOURCE_DIR}/LayerManagerService/src/GraphicalObject.cpp"
                      "${PROJECT_SOURCE_DIR}/LayerManagerService/src/GraphicalSurface.cpp"
                      "${PROJECT_SOURCE_DIR}/LayerManagerService/src/shader/*.cpp"
                      "${PROJECT_SOURCE_DIR}/LayerManagerService/src/commands/*.cpp")
index 90faa19..a3876be 100644 (file)
@@ -1,21 +1,21 @@
 /***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*        http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
+ *
+ * Copyright 2010,2011 BMW Car IT GmbH
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ****************************************************************************/
 
 #ifndef DBUSDBUSCommunicatorTest_H_
 #define DBUSDBUSCommunicatorTest_H_
@@ -44,38 +44,36 @@ using ::testing::ElementsAreArray;
 using ::testing::ElementsAre;
 using ::testing::NotNull;
 
-std::string DBUSCOMMAND_SYSTEM = "dbus-send --system --type=method_call --print-reply --dest=org.genivi.layermanagementservice /org/genivi/layermanagementservice org.genivi.layermanagementservice.";
-std::string DBUSCOMMAND_SESSION = "dbus-send --type=method_call --print-reply --dest=org.genivi.layermanagementservice /org/genivi/layermanagementservice org.genivi.layermanagementservice.";
+std::string DBUSCOMMAND_SYSTEM =
+        "dbus-send --system --type=method_call --print-reply --dest=org.genivi.layermanagementservice /org/genivi/layermanagementservice org.genivi.layermanagementservice.";
+std::string DBUSCOMMAND_SESSION =
+        "dbus-send --type=method_call --print-reply --dest=org.genivi.layermanagementservice /org/genivi/layermanagementservice org.genivi.layermanagementservice.";
 std::string DBUSCOMMAND = DBUSCOMMAND_SYSTEM;
 
-class DBUSCommunicatorTest : public ::testing::Test {
+class DBUSCommunicatorTest: public ::testing::Test {
 public:
     pthread_t processThread;
     bool running;
     ICommunicator* communicatorUnderTest;
     MockCommandExecutor mockCommandExecutor;
     MockLayerList layerlist;
-    
-    DBUSCommunicatorTest()
-    {
+
+    DBUSCommunicatorTest() {
     }
 
-    virtual ~DBUSCommunicatorTest()
-    {
+    virtual ~DBUSCommunicatorTest() {
     }
-    static void *processLoop (void * ptr)
-    {
-         while ( ((DBUSCommunicatorTest*)ptr)->running ) 
-         {
-            ((DBUSCommunicatorTest*)ptr)->communicatorUnderTest->process(100);
-         }
-         return NULL;
+
+    static void *processLoop(void * ptr) {
+        while (((DBUSCommunicatorTest*) ptr)->running) {
+            ((DBUSCommunicatorTest*) ptr)->communicatorUnderTest->process(100);
+        }
+        return NULL;
     }
-    void SetUp()
-    {
+
+    void SetUp() {
         char* useSessionBus = getenv("LM_USE_SESSION_BUS");
-        if ( NULL != useSessionBus && strcmp(useSessionBus,"enable") == 0 )
-        {
+        if (NULL != useSessionBus && strcmp(useSessionBus, "enable") == 0) {
             DBUSCOMMAND = DBUSCOMMAND_SESSION;
         } else {
             DBUSCOMMAND = DBUSCOMMAND_SYSTEM;
@@ -83,68 +81,64 @@ public:
         communicatorUnderTest = new DBUSCommunicator(&mockCommandExecutor);
         this->communicatorUnderTest->start();
         running = true;
-        pthread_create( &processThread, NULL, processLoop, (void*) this);        
+        pthread_create(&processThread, NULL, processLoop, (void*) this);
     }
 
-    void TearDown()
-    {
+    void TearDown() {
         running = false;
         this->communicatorUnderTest->stop();
-        pthread_join( processThread, NULL);        
-        if (communicatorUnderTest)
-        {
+        pthread_join(processThread, NULL);
+        if (communicatorUnderTest) {
             delete communicatorUnderTest;
-        }        
+        }
     }
 };
 
-MATCHER_P(DebugCommandEq, onoff, "DebugCommand has onoff set to %(onoff)s")
-{
+MATCHER_P(DebugCommandEq, onoff, "DebugCommand has onoff set to %(onoff)s") {
     return ((DebugCommand*)arg)->m_onoff == onoff;
 }
 
-TEST_F(DBUSCommunicatorTest, TurnDebugOnAndOff)
-{
+TEST_F(DBUSCommunicatorTest, TurnDebugOnAndOff) {
     EXPECT_CALL(this->mockCommandExecutor, execute(DebugCommandEq(false) ) ).Times(1);
-  system((DBUSCOMMAND + std::string("Debug boolean:false")).c_str());
+    system((DBUSCOMMAND + std::string("Debug boolean:false")).c_str());
     EXPECT_CALL(this->mockCommandExecutor, execute(DebugCommandEq(true) ) ).Times(1);
-  system((DBUSCOMMAND + std::string("Debug boolean:true")).c_str());
+    system((DBUSCOMMAND + std::string("Debug boolean:true")).c_str());
     EXPECT_CALL(this->mockCommandExecutor, execute(DebugCommandEq(false) ) ).Times(1);
-  system((DBUSCOMMAND + std::string("Debug boolean:false")).c_str());
+    system((DBUSCOMMAND + std::string("Debug boolean:false")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, ListAllLayerIDS) {
-  DefaultValue<Scene*>::Set((Scene*)&this->layerlist);
-  EXPECT_CALL(this->layerlist, getLayerIDs(NotNull(),NotNull() )).Times(1) ;
-  system((DBUSCOMMAND + std::string("ListAllLayerIDS")).c_str());
+    DefaultValue<Scene*>::Set((Scene*) &this->layerlist);
+    EXPECT_CALL(this->layerlist, getLayerIDs(NotNull(),NotNull() )).Times(1);
+    system((DBUSCOMMAND + std::string("ListAllLayerIDS")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, listAlllayerGroupIDS) {
     std::list<int> defaultlist;
     // Sets the default return value for type Bar.
-    DefaultValue<Scene*>::Set((Scene*)&this->layerlist);
-    DefaultValue< std::list<int> >::Set(defaultlist);
-    EXPECT_CALL(this->layerlist, getLayerGroupIDs(NotNull(),NotNull()) ).Times(1) ;
+    DefaultValue<Scene*>::Set((Scene*) &this->layerlist);
+    DefaultValue<std::list<int> >::Set(defaultlist);
+    EXPECT_CALL(this->layerlist, getLayerGroupIDs(NotNull(),NotNull()) ).Times(1);
     system((DBUSCOMMAND + std::string("ListAllLayerGroupIDS")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, listAllSurfaceGroupIDS) {
     std::list<int> defaultlist;
     // Sets the default return value for type Bar.
-    DefaultValue<Scene*>::Set((Scene*)&this->layerlist);
-    DefaultValue< std::list<int> >::Set(defaultlist);
-    EXPECT_CALL(this->layerlist, getSurfaceGroupIDs(NotNull(),NotNull() )).Times(1) ;
+    DefaultValue<Scene*>::Set((Scene*) &this->layerlist);
+    DefaultValue<std::list<int> >::Set(defaultlist);
+    EXPECT_CALL(this->layerlist, getSurfaceGroupIDs(NotNull(),NotNull() )).Times(1);
     system((DBUSCOMMAND + std::string("ListAllSurfaceGroupIDS")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, listSurfacesOfSurfacegroup) {
 
     std::list<int> defaultlist;
-    DefaultValue<Scene*>::Set((Scene*)&this->layerlist);    
+    DefaultValue<Scene*>::Set((Scene*) &this->layerlist);
     // Sets the default return value for type Bar.
-    DefaultValue< std::list<int> >::Set(defaultlist);
-    DefaultValue< SurfaceGroup* >::Set(new SurfaceGroup());
-    EXPECT_CALL(this->layerlist, getSurfaceGroup(Eq(84567u) )).Times(1) ;
+    DefaultValue<std::list<int> >::Set(defaultlist);
+    DefaultValue<SurfaceGroup*>::Set(new SurfaceGroup());
+    EXPECT_CALL(this->layerlist, getSurfaceGroup(Eq(84567u) )).Times(1);
     system((DBUSCOMMAND + std::string("ListSurfacesOfSurfacegroup uint32:84567")).c_str());
 
 }
@@ -153,11 +147,11 @@ TEST_F(DBUSCommunicatorTest, listlayersOflayergroup) {
 
     std::list<int> defaultlist;
     // Sets the default return value for type Bar.
-    DefaultValue<Scene*>::Set((Scene*)&this->layerlist);    
-    DefaultValue< std::list<int> >::Set(defaultlist);
-    DefaultValue< LayerGroup* >::Set(new LayerGroup());
+    DefaultValue<Scene*>::Set((Scene*) &this->layerlist);
+    DefaultValue<std::list<int> >::Set(defaultlist);
+    DefaultValue<LayerGroup*>::Set(new LayerGroup());
 
-    EXPECT_CALL(this->layerlist, getLayerGroup(Eq(345u) )).Times(1) ;
+    EXPECT_CALL(this->layerlist, getLayerGroup(Eq(345u) )).Times(1);
     system((DBUSCOMMAND + std::string("ListLayersOfLayergroup uint32:345")).c_str());
 
 }
@@ -165,632 +159,694 @@ TEST_F(DBUSCommunicatorTest, listlayersOflayergroup) {
 TEST_F(DBUSCommunicatorTest, listSurfaceoflayer) {
 
     Scene scene;
-    DefaultValue< Layer* >::Set(scene.createLayer(234));
-    DefaultValue<Scene*>::Set((Scene*)&layerlist);    
-    EXPECT_CALL(this->layerlist, getLayer(Eq(234u) )).Times(1) ;
+    DefaultValue<Layer*>::Set(scene.createLayer(234));
+    DefaultValue<Scene*>::Set((Scene*) &layerlist);
+    EXPECT_CALL(this->layerlist, getLayer(Eq(234u) )).Times(1);
     system((DBUSCOMMAND + std::string("ListSurfaceofLayer uint32:234")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, getPropertiesOfSurface) {
 
     Scene scene;
-    unsigned int newID=0;
-    DefaultValue<Scene*>::Set((Scene*)&layerlist);            
-    DefaultValue< Surface* >::Set(scene.createSurface(newID));
-    EXPECT_CALL(this->layerlist, getSurface(Eq(876u) )).Times(1) ;
+    unsigned int newID = 0;
+    DefaultValue<Scene*>::Set((Scene*) &layerlist);
+    DefaultValue<Surface*>::Set(scene.createSurface(newID));
+    EXPECT_CALL(this->layerlist, getSurface(Eq(876u) )).Times(1);
     system((DBUSCOMMAND + std::string("GetPropertiesOfSurface uint32:876")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, getPropertiesOflayer) {
 
     Scene scene;
-    DefaultValue< Layer* >::Set(scene.createLayer(0));
-    DefaultValue<Scene*>::Set((Scene*)&layerlist);    
-    EXPECT_CALL(this->layerlist, getLayer(Eq(876u) )).Times(1) ;
+    DefaultValue<Layer*>::Set(scene.createLayer(0));
+    DefaultValue<Scene*>::Set((Scene*) &layerlist);
+    EXPECT_CALL(this->layerlist, getLayer(Eq(876u) )).Times(1);
     system((DBUSCOMMAND + std::string("GetPropertiesOfLayer uint32:876")).c_str());
 }
 
-MATCHER_P5(CreateCommandEq, nativeHandle,OriginalWidth,OriginalHeight,createType,pixelformat, "%(*)s") {
-    return ((CreateCommand*)arg)->m_nativeHandle == nativeHandle
-            && ((CreateCommand*)arg)->m_originalHeight == OriginalHeight
-            && ((CreateCommand*)arg)->m_originalWidth == OriginalWidth
-            && ((CreateCommand*)arg)->m_createType == createType
-            && ((CreateCommand*)arg)->m_pixelformat == pixelformat;
+MATCHER_P4(SurfaceCreateCommandEq, nativeHandle, OriginalWidth, OriginalHeight, pixelformat, "%(*)s"){
+    return ((SurfaceCreateCommand*)arg)->m_nativeHandle == nativeHandle
+        && ((SurfaceCreateCommand*)arg)->m_originalHeight == OriginalHeight
+        && ((SurfaceCreateCommand*)arg)->m_originalWidth == OriginalWidth
+        && ((SurfaceCreateCommand*)arg)->m_pixelformat == pixelformat;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, CreateSurface) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(44u,33u,22u,TypeSurface,PIXELFORMAT_RGBA8888))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceCreateCommandEq(44u,33u,22u,PIXELFORMAT_RGBA8888))).Times(1);
     system((DBUSCOMMAND + std::string("CreateSurface uint32:44 uint32:33 uint32:22 uint32:2 ")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(404u,303u,0u,TypeSurface,PIXELFORMAT_RGB888))).Times(1);
-        system((DBUSCOMMAND + std::string("CreateSurface uint32:404 uint32:303 uint32:0 uint32:1 ")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceCreateCommandEq(404u,303u,0u,PIXELFORMAT_RGB888))).Times(1);
+    system((DBUSCOMMAND + std::string("CreateSurface uint32:404 uint32:303 uint32:0 uint32:1 ")).c_str());
+}
 
+MATCHER_P2(LayerCreateCommandEq, OriginalWidth, OriginalHeight, "%(*)s"){
+    return ((LayerCreateCommand*)arg)->m_originalHeight == OriginalHeight
+        && ((LayerCreateCommand*)arg)->m_originalWidth == OriginalWidth;
 }
 
-TEST_F(DBUSCommunicatorTest, Createlayer) {
+TEST_F(DBUSCommunicatorTest, CreateLayer) {
 
-    uint resolution[2] = {0,0};
+    uint resolution[2] = { 0, 0 };
     DefaultValue<uint*>::Set(resolution);
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeLayer,PIXELFORMAT_R8))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute( LayerCreateCommandEq(0u,0u))).Times(1);
     system((DBUSCOMMAND + std::string("CreateLayer")).c_str());
-
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeLayer,PIXELFORMAT_R8))).Times(1);
-    system((DBUSCOMMAND + std::string("CreateLayer")).c_str());
-
-
 }
 
-MATCHER_P2(RemoveCommandEq, idToRemove,typeToRemove, "%(*)s") {
-    return ((RemoveCommand*)arg)->m_idToRemove == idToRemove
-            && ((RemoveCommand*)arg)->m_typeToRemove == typeToRemove;
+MATCHER_P(SurfaceRemoveCommandEq, idToRemove, "%(*)s"){
+    return ((SurfaceRemoveCommand*)arg)->m_idToRemove == idToRemove;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, RemoveSurface) {
 
- EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(8u,TypeSurface))).Times(1);
-  system((DBUSCOMMAND + std::string("RemoveSurface uint32:8")).c_str());
-
-  EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(5u,TypeSurface))).Times(1);
-  system((DBUSCOMMAND + std::string("RemoveSurface uint32:5")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceRemoveCommandEq(8u))).Times(1);
+    system((DBUSCOMMAND + std::string("RemoveSurface uint32:8")).c_str());
 
+    EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceRemoveCommandEq(5u))).Times(1);
+    system((DBUSCOMMAND + std::string("RemoveSurface uint32:5")).c_str());
+}
 
+MATCHER_P(LayerRemoveCommandEq, idToRemove, "%(*)s"){
+    return ((LayerRemoveCommand*)arg)->m_idToRemove == idToRemove;
 }
 
 TEST_F(DBUSCommunicatorTest, Removelayer) {
-     EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(8u,TypeLayer))).Times(1);
-  system((DBUSCOMMAND + std::string("RemoveLayer uint32:8")).c_str());
-
-  EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(5u,TypeLayer))).Times(1);
-  system((DBUSCOMMAND + std::string("RemoveLayer uint32:5")).c_str());
-
+    EXPECT_CALL(this->mockCommandExecutor, execute( LayerRemoveCommandEq(8u))).Times(1);
+    system((DBUSCOMMAND + std::string("RemoveLayer uint32:8")).c_str());
 
+    EXPECT_CALL(this->mockCommandExecutor, execute( LayerRemoveCommandEq(5u))).Times(1);
+    system((DBUSCOMMAND + std::string("RemoveLayer uint32:5")).c_str());
 }
 
-MATCHER_P3(SetOpacityCommandEq, id,type,Opacity, "%(*)s") {
-    return ((SetOpacityCommand*)arg)->m_id == id
-            && ((SetOpacityCommand*)arg)->m_type == type
-            && ((SetOpacityCommand*)arg)->m_opacity == Opacity;
-
-  }
+MATCHER_P2(SurfaceSetOpacityCommandEq, id, Opacity, "%(*)s"){
+    return ((SurfaceSetOpacityCommand*)arg)->m_id == id
+        && ((SurfaceSetOpacityCommand*)arg)->m_opacity == Opacity;
+}
 
 TEST_F(DBUSCommunicatorTest, SetSurfaceOpacity) {
EXPECT_CALL(this->mockCommandExecutor, execute(SetOpacityCommandEq(36u,TypeSurface,0.88) )).Times(1);
   EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetOpacityCommandEq(36u,0.88) )).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceOpacity uint32:36 double:0.88")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute(SetOpacityCommandEq(44u,TypeSurface,0.001) )).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceOpacity uint32:44 double:0.001")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetOpacityCommandEq(44u,0.001) )).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceOpacity uint32:44 double:0.001")).c_str());
+}
 
+/*
+TEST_F(DBUSCommunicatorTest, Exit) {
+    EXPECT_CALL(this->mockCommandExecutor, execute(Field(&Command::commandType,Eq(Command::Exit)) ) ).Times(1);
+    system((DBUSCOMMAND + std::string("Exit")).c_str());
+
+    //EXPECT_EXIT(system((DBUSCOMMAND + std::string("Exit")).c_str());, ::testing::ExitedWithCode(0), "");
 }
+*/
 
-//TEST_F(DBUSCommunicatorTest, Exit) {
-// EXPECT_CALL(this->mockCommandExecutor, execute(Field(&Command::commandType,Eq(Command::Exit)) ) ).Times(1);
-//  system((DBUSCOMMAND + std::string("Exit")).c_str());
-//
-//
-//  //EXPECT_EXIT(system((DBUSCOMMAND + std::string("Exit")).c_str());, ::testing::ExitedWithCode(0), "");
-//
-//}
 /*
 TEST_F(DBUSCommunicatorTest, Commit) {
EXPECT_CALL(this->mockCommandExecutor, execute(Field(&ICommand::commandType,Eq(ICommand::CommitChanges)) ) ).Times(1);
-  system((DBUSCOMMAND + std::string("CommitChanges")).c_str());
   EXPECT_CALL(this->mockCommandExecutor, execute(Field(&ICommand::commandType, Eq(ICommand::CommitChanges)) ) ).Times(1);
+    system((DBUSCOMMAND + std::string("CommitChanges")).c_str());
 }
 */
 
-MATCHER_P6(SetSourceRectangleCommandEq, id,typeToSet,x,y,width,height, "%(*)s") {
-    return        ((SetSourceRectangleCommand*)arg)->m_id == id
-            && ((SetSourceRectangleCommand*)arg)->m_typeToSet == typeToSet
-            && ((SetSourceRectangleCommand*)arg)->m_x == x
-            && ((SetSourceRectangleCommand*)arg)->m_y == y
-            && ((SetSourceRectangleCommand*)arg)->m_width == width
-            && ((SetSourceRectangleCommand*)arg)->m_height == height;
-
-  }
+MATCHER_P5(SurfaceSetSourceRectangleCommandEq, id, x, y, width, height, "%(*)s"){
+    return ((SurfaceSetSourceRectangleCommand*)arg)->m_id == id
+        && ((SurfaceSetSourceRectangleCommand*)arg)->m_x == x
+        && ((SurfaceSetSourceRectangleCommand*)arg)->m_y == y
+        && ((SurfaceSetSourceRectangleCommand*)arg)->m_width == width
+        && ((SurfaceSetSourceRectangleCommand*)arg)->m_height == height;
+}
 
 TEST_F(DBUSCommunicatorTest, SetSurfaceSourceRegion) {
 
EXPECT_CALL(this->mockCommandExecutor, execute( SetSourceRectangleCommandEq(36u,TypeSurface,1u,2u,3u,4u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceSourceRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
   EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceSetSourceRectangleCommandEq(36u,1u,2u,3u,4u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceSourceRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
 
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetSourceRectangleCommandEq(44u,TypeSurface,15u,25u,35u,45u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceSourceRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute( SurfaceSetSourceRectangleCommandEq(44u,15u,25u,35u,45u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceSourceRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
+}
 
+MATCHER_P5(LayerSetSourceRectangleCommandEq, id, x, y, width, height, "%(*)s"){
+    return ((LayerSetSourceRectangleCommand*)arg)->m_id == id
+        && ((LayerSetSourceRectangleCommand*)arg)->m_x == x
+        && ((LayerSetSourceRectangleCommand*)arg)->m_y == y
+        && ((LayerSetSourceRectangleCommand*)arg)->m_width == width
+        && ((LayerSetSourceRectangleCommand*)arg)->m_height == height;
 }
 
 TEST_F(DBUSCommunicatorTest, SetlayerSourceRegion) {
 
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetSourceRectangleCommandEq(36u,TypeLayer,1u,2u,3u,4u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetLayerSourceRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
-
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetSourceRectangleCommandEq(44u,TypeLayer,15u,25u,35u,45u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetLayerSourceRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
-
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetSourceRectangleCommandEq(36u,1u,2u,3u,4u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetLayerSourceRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
 
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetSourceRectangleCommandEq(44u,15u,25u,35u,45u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetLayerSourceRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
 }
 
-MATCHER_P6(SetDestinationRectangleCommandEq, id,typeToSet,x,y,width,height, "%(*)s") {
-    return        ((SetDestinationRectangleCommand*)arg)->m_id == id
-            && ((SetDestinationRectangleCommand*)arg)->m_typeToSet == typeToSet
-            && ((SetDestinationRectangleCommand*)arg)->m_x == x
-            && ((SetDestinationRectangleCommand*)arg)->m_y == y
-            && ((SetDestinationRectangleCommand*)arg)->m_width == width
-            && ((SetDestinationRectangleCommand*)arg)->m_height == height;
+MATCHER_P5(LayerSetDestinationRectangleCommandEq, id, x, y, width, height, "%(*)s") {
+    return ((LayerSetDestinationRectangleCommand*)arg)->m_id == id
+        && ((LayerSetDestinationRectangleCommand*)arg)->m_x == x
+        && ((LayerSetDestinationRectangleCommand*)arg)->m_y == y
+        && ((LayerSetDestinationRectangleCommand*)arg)->m_width == width
+        && ((LayerSetDestinationRectangleCommand*)arg)->m_height == height;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, SetlayerDestinationRegion) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetDestinationRectangleCommandEq(36u,TypeLayer,1u,2u,3u,4u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetDestinationRectangleCommandEq(36u,1u,2u,3u,4u))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerDestinationRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetDestinationRectangleCommandEq(44u,TypeLayer,15u,25u,35u,45u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetDestinationRectangleCommandEq(44u,15u,25u,35u,45u))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerDestinationRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
+}
 
+MATCHER_P5(SurfaceSetDestinationRectangleCommandEq, id, x, y, width, height, "%(*)s") {
+    return ((SurfaceSetDestinationRectangleCommand*)arg)->m_id == id
+        && ((SurfaceSetDestinationRectangleCommand*)arg)->m_x == x
+        && ((SurfaceSetDestinationRectangleCommand*)arg)->m_y == y
+        && ((SurfaceSetDestinationRectangleCommand*)arg)->m_width == width
+        && ((SurfaceSetDestinationRectangleCommand*)arg)->m_height == height;
 }
 
 TEST_F(DBUSCommunicatorTest, SetSurfaceDestinationRegion) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetDestinationRectangleCommandEq(36u,TypeSurface,1u,2u,3u,4u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceDestinationRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
-
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetDestinationRectangleCommandEq(44u,TypeSurface,15u,25u,35u,45u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceDestinationRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
-
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetDestinationRectangleCommandEq(36u,1u,2u,3u,4u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceDestinationRegion uint32:36 uint32:1 uint32:2 uint32:3 uint32:4")).c_str());
 
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetDestinationRectangleCommandEq(44u,15u,25u,35u,45u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceDestinationRegion uint32:44 uint32:15 uint32:25 uint32:35 uint32:45 ")).c_str());
 }
 
-MATCHER_P4(SetPositionCommandEq, id,typeToSet,x,y, "%(*)s") {
-    return        ((SetPositionCommand*)arg)->m_id == id
-            && ((SetPositionCommand*)arg)->m_typeToSet == typeToSet
-            && ((SetPositionCommand*)arg)->m_x == x
-            && ((SetPositionCommand*)arg)->m_y == y;
-
-  }
+MATCHER_P3(LayerSetPositionCommandEq, id, x, y, "%(*)s"){
+    return ((LayerSetPositionCommand*)arg)->m_id == id
+        && ((LayerSetPositionCommand*)arg)->m_x == x
+        && ((LayerSetPositionCommand*)arg)->m_y == y;
+}
 
 TEST_F(DBUSCommunicatorTest, SetlayerPosition) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetPositionCommandEq(36u,TypeLayer,1u,2u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetPositionCommandEq(36u,1u,2u))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerPosition uint32:36 uint32:1 uint32:2")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetPositionCommandEq(44u,TypeLayer,15u,25u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetPositionCommandEq(44u,15u,25u))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerPosition uint32:44 uint32:15 uint32:25 ")).c_str());
 }
 
+MATCHER_P3(SurfaceSetPositionCommandEq, id, x, y, "%(*)s"){
+    return ((SurfaceSetPositionCommand*)arg)->m_id == id
+        && ((SurfaceSetPositionCommand*)arg)->m_x == x
+        && ((SurfaceSetPositionCommand*)arg)->m_y == y;
+}
+
 TEST_F(DBUSCommunicatorTest, SetSurfacePosition) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetPositionCommandEq(36u,TypeSurface,3u,4u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetPositionCommandEq(36u,3u,4u))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacePosition uint32:36 uint32:3 uint32:4")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetPositionCommandEq(44u,TypeSurface,35u,45u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetPositionCommandEq(44u,35u,45u))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacePosition uint32:44 uint32:35 uint32:45 ")).c_str());
 }
 
-MATCHER_P4(SetDimensionCommandEq, id,typeToSet, width,height, "%(*)s") {
-    return        ((SetDimensionCommand*)arg)->m_id == id
-            && ((SetDimensionCommand*)arg)->m_typeToSet == typeToSet
-            && ((SetDimensionCommand*)arg)->m_width == width
-            && ((SetDimensionCommand*)arg)->m_height == height;
+MATCHER_P3(LayerSetDimensionCommandEq, id, width, height, "%(*)s"){
+    return ((LayerSetDimensionCommand*)arg)->m_id == id
+        && ((LayerSetDimensionCommand*)arg)->m_width == width
+        && ((LayerSetDimensionCommand*)arg)->m_height == height;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, SetlayerDimension) {
EXPECT_CALL(this->mockCommandExecutor, execute( SetDimensionCommandEq(8554u,TypeLayer,400u,444u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetLayerDimension uint32:8554 uint32:400 uint32:444")).c_str());
   EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetDimensionCommandEq(8554u,400u,444u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetLayerDimension uint32:8554 uint32:400 uint32:444")).c_str());
 
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetDimensionCommandEq(34589u,TypeLayer,400u,444u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetLayerDimension uint32:34589 uint32:400 uint32:444")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetDimensionCommandEq(34589u,400u,444u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetLayerDimension uint32:34589 uint32:400 uint32:444")).c_str());
+}
+
+MATCHER_P3(SurfaceSetDimensionCommandEq, id, width, height, "%(*)s"){
+    return ((SurfaceSetDimensionCommand*)arg)->m_id == id
+        && ((SurfaceSetDimensionCommand*)arg)->m_width == width
+        && ((SurfaceSetDimensionCommand*)arg)->m_height == height;
 }
 
 TEST_F(DBUSCommunicatorTest, SetSurfaceDimension) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetDimensionCommandEq(36u,TypeSurface,3u,4u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceDimension uint32:36 uint32:3 uint32:4")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetDimensionCommandEq(36u,3u,4u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceDimension uint32:36 uint32:3 uint32:4")).c_str());
 
-  EXPECT_CALL(this->mockCommandExecutor, execute( SetDimensionCommandEq(44u,TypeSurface,35u,45u))).Times(1);
-  system((DBUSCOMMAND + std::string("SetSurfaceDimension uint32:44 uint32:35 uint32:45 ")).c_str());
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetDimensionCommandEq(44u,35u,45u))).Times(1);
+    system((DBUSCOMMAND + std::string("SetSurfaceDimension uint32:44 uint32:35 uint32:45 ")).c_str());
+}
 
+MATCHER_P2(LayerSetOpacityCommandEq, id, Opacity, "%(*)s"){
+    return ((LayerSetOpacityCommand*)arg)->m_id == id
+        && ((LayerSetOpacityCommand*)arg)->m_opacity == Opacity;
 }
 
 TEST_F(DBUSCommunicatorTest, SetlayerOpacity) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(36u,TypeLayer,0.88))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetOpacityCommandEq(36u,0.88))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerOpacity uint32:36 double:0.88")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(44u,TypeLayer,0.001))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetOpacityCommandEq(44u,0.001))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerOpacity uint32:44 double:0.001")).c_str());
 }
 
-MATCHER_P2(GetOpacityCommandEq, id,type,  "%(*)s") {
-    return        ((GetOpacityCommand*)arg)->m_id == id
-            && ((GetOpacityCommand*)arg)->m_type == type;
+MATCHER_P(LayerGetOpacityCommandEq, id, "%(*)s"){
+    return ((LayerGetOpacityCommand*)arg)->m_id == id;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, GetlayerOpacity) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(36u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetOpacityCommandEq(36u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerOpacity uint32:36")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(44u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetOpacityCommandEq(44u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerOpacity uint32:44 ")).c_str());
 }
 
+MATCHER_P2(SurfacegroupSetOpacityCommandEq, id, Opacity, "%(*)s") {
+    return ((SurfacegroupSetOpacityCommand*)arg)->m_id == id
+        && ((SurfacegroupSetOpacityCommand*)arg)->m_opacity == Opacity;
+}
+
 TEST_F(DBUSCommunicatorTest, SetSurfacegroupOpacity) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(36u,TypeSurfaceGroup,0.88))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetOpacityCommandEq(36u,0.88))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupOpacity uint32:36 double:0.88")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(44u,TypeSurfaceGroup,0.001))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetOpacityCommandEq(44u,0.001))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupOpacity uint32:44 double:0.001")).c_str());
 }
 
+MATCHER_P2(LayergroupSetOpacityCommandEq, id, Opacity, "%(*)s"){
+    return ((LayergroupSetOpacityCommand*)arg)->m_id == id
+        && ((LayergroupSetOpacityCommand*)arg)->m_opacity == Opacity;
+}
+
 TEST_F(DBUSCommunicatorTest, SetlayergroupOpacity) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(36u,TypeLayerGroup,0.88))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetOpacityCommandEq(36u,0.88))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupOpacity uint32:36 double:0.88")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOpacityCommandEq(44u,TypeLayerGroup,0.001))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetOpacityCommandEq(44u,0.001))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupOpacity uint32:44 double:0.001")).c_str());
 }
 
-MATCHER_P3(SetOrientationCommandEq, id,type,Orientation,  "%(*)s") {
-    return        ((SetOrientationCommand*)arg)->m_id == id
-            && ((SetOrientationCommand*)arg)->m_type == type
-            && ((SetOrientationCommand*)arg)->m_orientation == Orientation;
-
-  }
+MATCHER_P2(SurfaceSetOrientationCommandEq, id, Orientation, "%(*)s") {
+    return ((SurfaceSetOrientationCommand*)arg)->m_id == id
+        && ((SurfaceSetOrientationCommand*)arg)->m_orientation == Orientation;
+}
 
 TEST_F(DBUSCommunicatorTest, SetSurfaceOrientation) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOrientationCommandEq(36u,TypeSurface,0))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetOrientationCommandEq(36u,0))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceOrientation uint32:36 uint32:0")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOrientationCommandEq(44u,TypeSurface,1))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetOrientationCommandEq(44u,1))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceOrientation uint32:44 uint32:1")).c_str());
 }
 
+MATCHER_P2(LayerSetOrientationCommandEq, id, Orientation, "%(*)s") {
+    return ((LayerSetOrientationCommand*)arg)->m_id == id
+        && ((LayerSetOrientationCommand*)arg)->m_orientation == Orientation;
+}
+
 TEST_F(DBUSCommunicatorTest, SetlayerOrientation) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOrientationCommandEq(36u,TypeLayer,0))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetOrientationCommandEq(36u,0))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerOrientation uint32:36 uint32:0")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetOrientationCommandEq(44u,TypeLayer,1))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetOrientationCommandEq(44u,1))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerOrientation uint32:44 uint32:1")).c_str());
 }
 
+MATCHER_P2(SurfaceSetVisibilityCommandEq, id, visibility, "%(*)s"){
+    return ((SurfaceSetVisibilityCommand*)arg)->m_idtoSet == id
+        && ((SurfaceSetVisibilityCommand*)arg)->m_visibility == visibility;
+}
 
-MATCHER_P3(SetVisibilityCommandEq, id,otype,visibility, "%(*)s") {
-    return ((SetVisibilityCommand*)arg)->m_idtoSet == id
-            && ((SetVisibilityCommand*)arg)->m_otype == otype
-            && ((SetVisibilityCommand*)arg)->m_visibility == visibility;
-
-  }
 TEST_F(DBUSCommunicatorTest, SetSurfaceVisibility) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeSurface,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeSurface,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceVisibility uint32:44 boolean:true")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeSurface,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeSurface,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfaceVisibility uint32:44 boolean:true")).c_str());
+}
 
+MATCHER_P2(LayerSetVisibilityCommandEq, id, visibility, "%(*)s"){
+    return ((LayerSetVisibilityCommand*)arg)->m_idtoSet == id
+        && ((LayerSetVisibilityCommand*)arg)->m_visibility == visibility;
 }
 
 TEST_F(DBUSCommunicatorTest, SetlayerVisibility) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeLayer,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeLayer,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerVisibility uint32:44 boolean:true")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeLayer,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeLayer,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayerVisibility uint32:44 boolean:true")).c_str());
 }
 
+MATCHER_P2(SurfacegroupSetVisibilityCommandEq, id, visibility, "%(*)s"){
+    return ((SurfacegroupSetVisibilityCommand*)arg)->m_idtoSet == id
+        && ((SurfacegroupSetVisibilityCommand*)arg)->m_visibility == visibility;
+}
+
 TEST_F(DBUSCommunicatorTest, SetSurfacegroupVisibility) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeSurfaceGroup,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeSurfaceGroup,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupVisibility uint32:44 boolean:true")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeSurfaceGroup,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeSurfaceGroup,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetSurfacegroupVisibility uint32:44 boolean:true")).c_str());
 
 }
 
+MATCHER_P2(LayergroupSetVisibilityCommandEq, id, visibility, "%(*)s"){
+    return ((LayergroupSetVisibilityCommand*)arg)->m_idtoSet == id
+        && ((LayergroupSetVisibilityCommand*)arg)->m_visibility == visibility;
+}
+
 TEST_F(DBUSCommunicatorTest, SetlayergroupVisibility) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeLayerGroup,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeLayerGroup,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupVisibility uint32:44 boolean:true")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(36u,TypeLayerGroup,false))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetVisibilityCommandEq(36u,false))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupVisibility uint32:36 boolean:false")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetVisibilityCommandEq(44u,TypeLayerGroup,true))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupSetVisibilityCommandEq(44u,true))).Times(1);
     system((DBUSCOMMAND + std::string("SetLayergroupVisibility uint32:44 boolean:true")).c_str());
 }
 
-MATCHER_P2(SurfacegroupAddSurfaceCommandEq, surfaceid, surfacegroupid, "%(*)s") {
+MATCHER_P2(SurfacegroupAddSurfaceCommandEq, surfaceid, surfacegroupid, "%(*)s"){
     return ((SurfacegroupAddSurfaceCommand*)arg)->m_surfacegroupid == surfacegroupid
         && ((SurfacegroupAddSurfaceCommand*)arg)->m_surfaceid == surfaceid;
 
-  }
+}
 TEST_F(DBUSCommunicatorTest, AddSurfaceToSurfaceGroup) {
 
- EXPECT_CALL(this->mockCommandExecutor, execute( SurfacegroupAddSurfaceCommandEq(36u,77u))).Times(1);
   EXPECT_CALL(this->mockCommandExecutor, execute( SurfacegroupAddSurfaceCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("AddSurfaceToSurfaceGroup uint32:36 uint32:77")).c_str());
 }
 
-MATCHER_P2(SurfacegroupRemoveSurfaceCommandEq, surfacegroupid, surfaceid, "%(*)s") {
+MATCHER_P2(SurfacegroupRemoveSurfaceCommandEq, surfacegroupid, surfaceid, "%(*)s"){
     return ((SurfacegroupRemoveSurfaceCommand*)arg)->m_surfacegroupid == surfacegroupid
         && ((SurfacegroupRemoveSurfaceCommand*)arg)->m_surfaceid == surfaceid;
-  }
+}
+
 TEST_F(DBUSCommunicatorTest, RemoveSurfaceFromSurfaceGroup) {
 
     EXPECT_CALL(this->mockCommandExecutor, execute( SurfacegroupAddSurfaceCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveSurfaceFromSurfaceGroup uint32:36 uint32:77")).c_str());
-
 }
 
-MATCHER_P2(LayergroupAddLayerCommandEq, layerid,layergroupid, "%(*)s") {
+MATCHER_P2(LayergroupAddLayerCommandEq, layerid, layergroupid, "%(*)s"){
     return ((LayergroupAddLayerCommand*)arg)->m_layergroupid == layergroupid
         && ((LayergroupAddLayerCommand*)arg)->m_layerid == layerid;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, AddlayerTolayerGroup) {
 
- EXPECT_CALL(this->mockCommandExecutor, execute( LayergroupAddLayerCommandEq(36u,77u))).Times(1);
   EXPECT_CALL(this->mockCommandExecutor, execute( LayergroupAddLayerCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("AddLayerToLayerGroup uint32:36 uint32:77")).c_str());
-
 }
 
-MATCHER_P2(LayergroupRemoveLayerCommandEq, layerid,layergroupid, "%(*)s") {
+MATCHER_P2(LayergroupRemoveLayerCommandEq, layerid,layergroupid, "%(*)s"){
     return ((LayergroupRemoveLayerCommand*)arg)->m_layergroupid == layergroupid
         && ((LayergroupRemoveLayerCommand*)arg)->m_layerid == layerid;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, RemovelayerFromlayerGroup) {
 
     EXPECT_CALL(this->mockCommandExecutor, execute( LayergroupRemoveLayerCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveLayerFromLayerGroup uint32:36 uint32:77")).c_str());
 }
 
-MATCHER_P2(LayerAddSurfaceCommandEq, surfaceid,layerid, "%(*)s") {
+MATCHER_P2(LayerAddSurfaceCommandEq, surfaceid, layerid, "%(*)s"){
     return ((LayerAddSurfaceCommand*)arg)->m_layerid == layerid
         && ((LayerAddSurfaceCommand*)arg)->m_surfaceid == surfaceid;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, AddSurfaceTolayer) {
 
     EXPECT_CALL(this->mockCommandExecutor, execute( LayerAddSurfaceCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("AddSurfaceToLayer uint32:36 uint32:77")).c_str());
 }
 
-MATCHER_P2(LayerRemoveSurfaceCommandEq, surfaceid,layerid, "%(*)s") {
+MATCHER_P2(LayerRemoveSurfaceCommandEq, surfaceid, layerid, "%(*)s"){
     return ((LayerRemoveSurfaceCommand*)arg)->m_layerid == layerid
         && ((LayerRemoveSurfaceCommand*)arg)->m_surfaceid == surfaceid;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, RemoveSurfaceFromlayer) {
+
     EXPECT_CALL(this->mockCommandExecutor, execute( LayerRemoveSurfaceCommandEq(36u,77u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveSurfaceFromLayer uint32:36 uint32:77")).c_str());
 }
 
+/*
 TEST_F(DBUSCommunicatorTest, CreateSurfaceGroup) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeSurfaceGroup,PIXELFORMAT_R8))).Times(1);
+
+    EXPECT_CALL(this->mockCommandExecutor, execute()).Times(1);
     system((DBUSCOMMAND + std::string("CreateSurfaceGroup")).c_str());
 
     EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeSurfaceGroup,PIXELFORMAT_R8))).Times(1);
     system((DBUSCOMMAND + std::string("CreateSurfaceGroup")).c_str());
 }
+*/
+
+MATCHER_P(SurfacegroupRemoveCommandEq, idToRemove, "%(*)s") {
+    return ((SurfacegroupRemoveCommand*)arg)->m_idToRemove == idToRemove;
+}
 
 TEST_F(DBUSCommunicatorTest, RemoveSurfaceGroup) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(8554u,TypeSurfaceGroup))).Times(1);
+
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupRemoveCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveSurfaceGroup uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(34589u,TypeSurfaceGroup))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfacegroupRemoveCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveSurfaceGroup uint32:34589")).c_str());
 }
 
+/*
 TEST_F(DBUSCommunicatorTest, CreatelayerGroup) {
+
     EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeLayerGroup,PIXELFORMAT_R8))).Times(1);
     system((DBUSCOMMAND + std::string("CreateLayerGroup")).c_str());
 
     EXPECT_CALL(this->mockCommandExecutor, execute( CreateCommandEq(0u,0u,0u,TypeLayerGroup,PIXELFORMAT_R8))).Times(1);
     system((DBUSCOMMAND + std::string("CreateLayerGroup")).c_str());
 }
+*/
+
+MATCHER_P(LayergroupRemoveCommandEq, idToRemove, "%(*)s") {
+    return ((LayergroupRemoveCommand*)arg)->m_idToRemove == idToRemove;
+}
 
 TEST_F(DBUSCommunicatorTest, RemovelayerGroup) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(8554u,TypeLayerGroup))).Times(1);
+
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupRemoveCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveLayerGroup uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( RemoveCommandEq(34589u,TypeLayerGroup))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayergroupRemoveCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("RemoveLayerGroup uint32:34589")).c_str());
 }
 
-MATCHER_P2(GetDimensionCommandEq, id, type, "%(*)s") {
-    return ((GetDimensionCommand*)arg)->m_id == id
-        && ((GetDimensionCommand*)arg)->m_type == type;
-  }
+MATCHER_P(LayerGetDimensionCommandEq, id, "%(*)s") {
+    return ((LayerGetDimensionCommand*)arg)->m_id == id;
+}
+
 TEST_F(DBUSCommunicatorTest, GetlayerDimension) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetDimensionCommandEq(8554u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetDimensionCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerDimension uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetDimensionCommandEq(34589u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetDimensionCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerDimension uint32:34589")).c_str());
-
 }
 
+MATCHER_P(SurfaceGetDimensionCommandEq, id, "%(*)s") {
+    return ((SurfaceGetDimensionCommand*)arg)->m_id == id;
+}
 
 TEST_F(DBUSCommunicatorTest, GetSurfaceDimension) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetDimensionCommandEq(8554u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetDimensionCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceDimension uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetDimensionCommandEq(34589u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetDimensionCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceDimension uint32:34589")).c_str());
 }
 
-MATCHER_P2(GetPixelformatCommandEq, id, type, "%(*)s") {
-    return ((GetPixelformatCommand*)arg)->m_id == id
-        && ((GetPixelformatCommand*)arg)->m_type == type;
-  }
+MATCHER_P(SurfaceGetPixelformatCommandEq, id, "%(*)s"){
+    return ((SurfaceGetPixelformatCommand*)arg)->m_id == id;
+}
+
 TEST_F(DBUSCommunicatorTest, GetSurfacePixelformat) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetPixelformatCommandEq(8554u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetPixelformatCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfacePixelformat uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetPixelformatCommandEq(34589u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetPixelformatCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfacePixelformat uint32:34589")).c_str());
 }
 
+MATCHER_P(SurfaceGetOpacityCommandEq, id, "%(*)s"){
+    return ((SurfaceGetOpacityCommand*)arg)->m_id == id;
+}
+
 TEST_F(DBUSCommunicatorTest, GetSurfaceOpacity) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(8554u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetOpacityCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceOpacity uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(34589u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetOpacityCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceOpacity uint32:34589")).c_str());
 }
 
+MATCHER_P(SurfaceGetVisibilityCommandEq, id, "%(*)s") {
+    return ((SurfaceGetVisibilityCommand*)arg)->m_id == id;
+}
+
 TEST_F(DBUSCommunicatorTest, GetSurfaceVisibility) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(8554u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetVisibilityCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceVisibility uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetOpacityCommandEq(34589u,TypeSurface))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceGetVisibilityCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetSurfaceVisibility uint32:34589")).c_str());
 }
 
-MATCHER_P2(GetVisibilityCommandEq, id,type, "%(*)s") {
-    return ((GetVisibilityCommand*)arg)->m_id == id
-            && ((GetVisibilityCommand*)arg)->m_type == type;
+MATCHER_P(LayerGetVisibilityCommandEq, id, "%(*)s"){
+    return ((LayerGetVisibilityCommand*)arg)->m_id == id;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, GetlayerVisibility) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetVisibilityCommandEq(8554u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetVisibilityCommandEq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerVisibility uint32:8554")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( GetVisibilityCommandEq(34589u,TypeLayer))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(LayerGetVisibilityCommandEq(34589u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerVisibility uint32:34589")).c_str());
 }
 
-//MATCHER_P2(RenderOrderTester,commandtype,list, "") {
-//    LOG_ERROR("in tester",0);
-//    commandtype_type command = (commandtype_type)arg;
-//    testing::internal::ElementsAreArrayMatcher<int> matcher = ElementsAreArray(command->array,3);
-//    std::vector<uint> l;
-//    testing::Matcher<std::vector<uint, std::allocator<uint> > > matcher2 = matcher.operator Matcher<std::vector<uint> >();
-//    bool result = matcher2.Matches(list);
-//    return result;
-//
-//}
-//
-//TEST_F(DBUSCommunicatorTest, SetRenderOrderOflayers) {
-//
-////  DBUSClient* client = dbus_helper();
-////  if (NULL== client)
-////      LOG_ERROR("TEST", "client is null");
-////
-////  std::vector<uint> expected;
-////  expected.push_back(4);
-////  expected.push_back(47);
-////  expected.push_back(49);
-////  SetLayerOrderCommand * p;
-//// EXPECT_CALL(this->mockCommandExecutor,execute(RenderOrderTester(p,expected))).Times(1);
-////  uint display = 0;
-////  client->SetRenderOrderOfLayers(expected,display);
-//
-//}
-//
-//TEST_F(DBUSCommunicatorTest, SetRenderOrderWithinlayer) {
-////  DBUSClient* client = dbus_helper();
-////
-////  std::vector<uint> expected;
-////  expected.push_back(4);
-////  expected.push_back(47);
-////  expected.push_back(49);
-////  SetOrderWithinLayerCommand * p;
-//// EXPECT_CALL(this->mockCommandExecutor,execute(AllOf(
-////                          RenderOrderTester(p,expected),
-////                          FieldCast(&SetOrderWithinLayerCommand::layerid,55))
-////                          )).Times(1);
-////  client->SetSurfaceRenderOrderWithinLayer(55,expected);
+/*
+MATCHER_P2(RenderOrderTester,commandtype,list, "") {
+    LOG_ERROR("in tester",0);
+    commandtype_type command = (commandtype_type)arg;
+    testing::internal::ElementsAreArrayMatcher<int> matcher = ElementsAreArray(command->array,3);
+    std::vector<uint> l;
+    testing::Matcher<std::vector<uint, std::allocator<uint> > > matcher2 = matcher.operator Matcher<std::vector<uint> >();
+    bool result = matcher2.Matches(list);
+    return result;
+}
+
+TEST_F(DBUSCommunicatorTest, SetRenderOrderOflayers) {
+
+//  DBUSClient* client = dbus_helper();
+//  if (NULL== client)
+//      LOG_ERROR("TEST", "client is null");
 //
+//  std::vector<uint> expected;
+//  expected.push_back(4);
+//  expected.push_back(47);
+//  expected.push_back(49);
+//  SetLayerOrderCommand * p;
+// EXPECT_CALL(this->mockCommandExecutor,execute(RenderOrderTester(p,expected))).Times(1);
+//  uint display = 0;
+//  client->SetRenderOrderOfLayers(expected,display);
+
+}
+
+TEST_F(DBUSCommunicatorTest, SetRenderOrderWithinlayer) {
+//  DBUSClient* client = dbus_helper();
 //
-//}
+//  std::vector<uint> expected;
+//  expected.push_back(4);
+//  expected.push_back(47);
+//  expected.push_back(49);
+//  SetOrderWithinLayerCommand * p;
+// EXPECT_CALL(this->mockCommandExecutor,execute(AllOf(
+//                          RenderOrderTester(p,expected),
+//                          FieldCast(&SetOrderWithinLayerCommand::layerid,55))
+//                          )).Times(1);
+//  client->SetSurfaceRenderOrderWithinLayer(55,expected);
+}
+*/
 
 TEST_F(DBUSCommunicatorTest, GetlayerType) {
-    DefaultValue<Scene*>::Set((Scene*)&layerlist);    
+    DefaultValue<Scene*>::Set((Scene*) &layerlist);
     EXPECT_CALL(this->layerlist, getLayer(Eq(8554u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerType uint32:8554")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, GetlayertypeCapabilities) {
- EXPECT_CALL(this->mockCommandExecutor, getLayerTypeCapabilities(Eq(367))).Times(1);
-  system((DBUSCOMMAND + std::string("GetLayertypeCapabilities uint32:367")).c_str());
   EXPECT_CALL(this->mockCommandExecutor, getLayerTypeCapabilities(Eq(367))).Times(1);
+    system((DBUSCOMMAND + std::string("GetLayertypeCapabilities uint32:367")).c_str());
 }
 
 TEST_F(DBUSCommunicatorTest, GetlayerCapabilities) {
     Scene scene;
-    DefaultValue<Scene*>::Set((Scene*)&layerlist);    
+    DefaultValue<Scene*>::Set((Scene*) &layerlist);
     EXPECT_CALL(this->layerlist, getLayer(Eq(367u))).Times(1);
     system((DBUSCOMMAND + std::string("GetLayerCapabilities uint32:367")).c_str());
 
 }
 
-MATCHER_P2(CreateShaderCommandEq, _vertName,_fragName, "%(*)s") {
-    return ((CreateShaderCommand*)arg)->getVertName() == _vertName
-            && ((CreateShaderCommand*)arg)->getFragName() == _fragName;
-
-  }
+MATCHER_P2(ShaderCreateCommandEq, _vertName,_fragName, "%(*)s") {
+    return ((ShaderCreateCommand*)arg)->getVertName() == _vertName
+        && ((ShaderCreateCommand*)arg)->getFragName() == _fragName;
+}
 
 TEST_F(DBUSCommunicatorTest, CreateShader) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateShaderCommandEq(std::string("test123.glslv"),std::string("differentshader.glslv")))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(ShaderCreateCommandEq(std::string("test123.glslv"),std::string("differentshader.glslv")))).Times(1);
     system((DBUSCOMMAND + std::string("CreateShader string:test123.glslv string:differentshader.glslv")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( CreateShaderCommandEq(std::string("/usr/lib/shadertest.glslv"),std::string("foobar")))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(ShaderCreateCommandEq(std::string("/usr/lib/shadertest.glslv"),std::string("foobar")))).Times(1);
     system((DBUSCOMMAND + std::string("CreateShader string:/usr/lib/shadertest.glslv string:foobar")).c_str());
 }
 
-MATCHER_P(DestroyShaderCommandEq, id, "%(*)s") {
-    return ((DestroyShaderCommand*)arg)->getShaderID() == id;
+MATCHER_P(ShaderDestroyCommandEq, id, "%(*)s") {
+    return ((ShaderDestroyCommand*)arg)->getShaderID() == id;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, DestroyShaderCommand) {
-    EXPECT_CALL(this->mockCommandExecutor, execute( DestroyShaderCommandEq(567u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(ShaderDestroyCommandEq(567u))).Times(1);
     system((DBUSCOMMAND + std::string("DestroyShader uint32:567")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( DestroyShaderCommandEq(185u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(ShaderDestroyCommandEq(185u))).Times(1);
     system((DBUSCOMMAND + std::string("DestroyShader uint32:185")).c_str());
 }
 
-MATCHER_P2(SetShaderCommandEq, id,shaderid, "%(*)s") {
-    return ((SetShaderCommand*)arg)->getID() == id
-        && ((SetShaderCommand*)arg)->getShaderID() == shaderid;
+MATCHER_P2(SurfaceSetShaderCommandEq, id, shaderid, "%(*)s") {
+    return ((SurfaceSetShaderCommand*)arg)->getID() == id
+        && ((SurfaceSetShaderCommand*)arg)->getShaderID() == shaderid;
+}
 
-  }
 TEST_F(DBUSCommunicatorTest, SetShaderCommand) {
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetShaderCommandEq(987u, 567u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetShaderCommandEq(987u, 567u))).Times(1);
     system((DBUSCOMMAND + std::string("SetShader uint32:987 uint32:567")).c_str());
 
-    EXPECT_CALL(this->mockCommandExecutor, execute( SetShaderCommandEq(1u, 998877u))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(SurfaceSetShaderCommandEq(1u, 998877u))).Times(1);
     system((DBUSCOMMAND + std::string("SetShader uint32:1 uint32:998877")).c_str());
 }
 
-MATCHER_P(UniformsMatcher,expectedlist,"") {
-    SetUniformsCommand* command = (SetUniformsCommand*)arg;
+MATCHER_P(ShaderUniformsMatcher,expectedlist,"") {
+    ShaderSetUniformsCommand* command = (ShaderSetUniformsCommand*)arg;
     std::vector<std::string> uniforms = command->getUniforms();
 
     EXPECT_THAT(uniforms,ElementsAreArray(*expectedlist));
@@ -798,23 +854,18 @@ MATCHER_P(UniformsMatcher,expectedlist,"") {
     return true;
 }
 
-MATCHER_P(SetUniformsCommandEq, _shaderid, "%(*)s") {
-    return ((SetUniformsCommand*)arg)->getShaderId() == _shaderid;
-
-  }
+MATCHER_P(ShaderSetUniformsCommandEq, _shaderid, "%(*)s"){
+    return ((ShaderSetUniformsCommand*)arg)->getShaderId() == _shaderid;
+}
 
-TEST_F(DBUSCommunicatorTest, SetUniformsCommand) {
+TEST_F(DBUSCommunicatorTest, ShaderSetUniformsCommand) {
 
-    std::string expected1[] = { "uRotAngle 1f 1 0","uRotVector 3f 1 1 0 0" };
-    EXPECT_CALL(this->mockCommandExecutor, execute( AllOf( SetUniformsCommandEq(1u),
-                                                                          UniformsMatcher(&expected1)
-                                               ))).Times(1);
+    std::string expected1[] = { "uRotAngle 1f 1 0", "uRotVector 3f 1 1 0 0" };
+    EXPECT_CALL(this->mockCommandExecutor, execute( AllOf(ShaderSetUniformsCommandEq(1u), ShaderUniformsMatcher(&expected1)))).Times(1);
     system((DBUSCOMMAND + std::string("SetUniforms uint32:1 array:string:\"uRotAngle 1f 1 0\",\"uRotVector 3f 1 1 0 0\"")).c_str());
 
     std::string expected2[] = { "teststring foobar" };
-    EXPECT_CALL(this->mockCommandExecutor, execute( AllOf( SetUniformsCommandEq(17346u),
-                                                           UniformsMatcher(&expected2)
-                                                   ))).Times(1);
+    EXPECT_CALL(this->mockCommandExecutor, execute(AllOf(ShaderSetUniformsCommandEq(17346u), ShaderUniformsMatcher(&expected2)))).Times(1);
     system((DBUSCOMMAND + std::string("SetUniforms uint32:17346 array:string:\"teststring foobar\"")).c_str());
 }
 
index 828e3c9..d0bf872 100644 (file)
@@ -29,7 +29,8 @@ link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerUtils/bin")
 link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerCommands")
 
 # generate version header file, used in main.cpp
-message("-- Generating Version.h header file")
+message(STATUS "Generating Version.h header file:")
+message(STATUS "-- version = ${ILM_VERSION}")
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/include/Version.h.in
     ${CMAKE_CURRENT_SOURCE_DIR}/include/Version.h
index 1569b1a..2c722f1 100644 (file)
@@ -35,6 +35,8 @@ public:
 
        GraphicalObject(int externalId,ObjectType type, double opacity, bool visibility);
 
+       virtual ~GraphicalObject() {}
+
     /**
      * @brief Set alpha value
      * @param alpha The new Alpha Value between 0.0 (full transparency) and 1.0 (fully visible)
index 879086f..3866593 100644 (file)
@@ -35,6 +35,8 @@ public:
 
     GraphicalSurface(int externalId,ObjectType type);
 
+    virtual ~GraphicalSurface() {}
+
     /**
      * Set Orientation value
      * @param orientation the new value. Multiples of 90 degrees. (0->0°, 1->90°, 2->180°,3->279°)
index a19ac4c..6c2f5bd 100644 (file)
@@ -38,6 +38,8 @@ public:
     Layer();
     Layer(int id);
 
+    virtual ~Layer() {}
+
     LayerType getLayerType() const;
     void setLayerType(LayerType lt);
     void setLayerCapabilities(unsigned int newCapabilities);
index 39fdaac..f70bdc1 100644 (file)
@@ -51,7 +51,7 @@ class Scene: public IScene
 
 public:
     Scene();
-    ~Scene();
+    virtual ~Scene();
 
     virtual Layer* createLayer(const uint id);
     virtual Surface *createSurface(const uint id);