]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Move Mock files from src/ConstructionAPI/Test to src/ModelHighAPI/Mock
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 26 May 2016 13:40:05 +0000 (16:40 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:02 +0000 (14:41 +0300)
src/ConstructionAPI/Test/CMakeLists.txt
src/ConstructionAPI/Test/MockModelAPI_AttributeDouble.h [deleted file]
src/ConstructionAPI/Test/MockModelAPI_Data.h [deleted file]
src/ConstructionAPI/Test/MockModelAPI_Document.h [deleted file]
src/ConstructionAPI/Test/MockModelAPI_Feature.h [deleted file]
src/ConstructionAPI/Test/MockModelAPI_Object.h [deleted file]
src/ModelHighAPI/Mock/MockModelAPI_AttributeDouble.h [new file with mode: 0644]
src/ModelHighAPI/Mock/MockModelAPI_Data.h [new file with mode: 0644]
src/ModelHighAPI/Mock/MockModelAPI_Document.h [new file with mode: 0644]
src/ModelHighAPI/Mock/MockModelAPI_Feature.h [new file with mode: 0644]
src/ModelHighAPI/Mock/MockModelAPI_Object.h [new file with mode: 0644]

index bbc44a46a0a8bfd2600ff968bfc0b5f6c15e7da7..2df95c8c2c1bfbfd5750484585efcf84d45da1aa 100644 (file)
@@ -7,6 +7,7 @@ include_directories(
   ${PROJECT_SOURCE_DIR}/src/ModelAPI
   ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
   ${PROJECT_SOURCE_DIR}/src/ConstructionAPI
+  ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/Mock
 )
 
 set(PROJECT_SOURCES
diff --git a/src/ConstructionAPI/Test/MockModelAPI_AttributeDouble.h b/src/ConstructionAPI/Test/MockModelAPI_AttributeDouble.h
deleted file mode 100644 (file)
index a3d1fc0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef MockModelAPI_AttributeDouble_H_
-#define MockModelAPI_AttributeDouble_H_
-
-#include <gmock/gmock.h>
-
-#include <ModelAPI_AttributeDouble.h>
-
-class MockModelAPI_AttributeDouble : public ModelAPI_AttributeDouble {
- public:
-  MOCK_METHOD1(setValue,
-      void(const double theValue));
-  MOCK_METHOD0(value,
-      double());
-  MOCK_METHOD1(setCalculatedValue,
-      void(const double theValue));
-  MOCK_METHOD1(setText,
-      void(const std::string& theText));
-  MOCK_METHOD0(text,
-      std::string());
-  MOCK_METHOD1(setExpressionInvalid,
-      void(const bool theFlag));
-  MOCK_METHOD0(expressionInvalid,
-      bool());
-  MOCK_METHOD1(setExpressionError,
-      void(const std::string& theError));
-  MOCK_METHOD0(expressionError,
-      std::string());
-  MOCK_METHOD1(setUsedParameters,
-      void(const std::set<std::string>& theUsedParameters));
-  MOCK_CONST_METHOD0(usedParameters,
-      std::set<std::string>());
-};
-
-#endif // MockModelAPI_AttributeDouble_H_
diff --git a/src/ConstructionAPI/Test/MockModelAPI_Data.h b/src/ConstructionAPI/Test/MockModelAPI_Data.h
deleted file mode 100644 (file)
index c8f99a7..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef MockModelAPI_Data_H_
-#define MockModelAPI_Data_H_
-
-#include <gmock/gmock.h>
-
-#include <ModelAPI_Data.h>
-
-class MockModelAPI_Data : public ModelAPI_Data {
- public:
-  MOCK_METHOD0(name,
-      std::string());
-  MOCK_METHOD1(setName,
-      void(const std::string& theName));
-  MOCK_METHOD1(document,
-      std::shared_ptr<ModelAPI_AttributeDocRef>(const std::string& theID));
-  MOCK_METHOD1(real,
-      std::shared_ptr<ModelAPI_AttributeDouble>(const std::string& theID));
-  MOCK_METHOD1(integer,
-      std::shared_ptr<ModelAPI_AttributeInteger>(const std::string& theID));
-  MOCK_METHOD1(reference,
-      std::shared_ptr<ModelAPI_AttributeReference>(const std::string& theID));
-  MOCK_METHOD1(selection,
-      std::shared_ptr<ModelAPI_AttributeSelection>(const std::string& theID));
-  MOCK_METHOD1(selectionList,
-      std::shared_ptr<ModelAPI_AttributeSelectionList>(const std::string& theID));
-  MOCK_METHOD1(refattr,
-      std::shared_ptr<ModelAPI_AttributeRefAttr>(const std::string& theID));
-  MOCK_METHOD1(reflist,
-      std::shared_ptr<ModelAPI_AttributeRefList>(const std::string& theID));
-  MOCK_METHOD1(refattrlist,
-      std::shared_ptr<ModelAPI_AttributeRefAttrList>(const std::string& theID));
-  MOCK_METHOD1(boolean,
-      std::shared_ptr<ModelAPI_AttributeBoolean>(const std::string& theID));
-  MOCK_METHOD1(string,
-      std::shared_ptr<ModelAPI_AttributeString>(const std::string& theID));
-  MOCK_METHOD1(intArray,
-      std::shared_ptr<ModelAPI_AttributeIntArray>(const std::string& theID));
-  MOCK_METHOD1(attribute,
-      std::shared_ptr<ModelAPI_Attribute>(const std::string& theID));
-  MOCK_METHOD1(attributes,
-      std::list<std::shared_ptr<ModelAPI_Attribute> >(const std::string& theType));
-  MOCK_METHOD1(attributesIDs,
-      std::list<std::string>(const std::string& theType));
-  MOCK_METHOD1(id,
-      const std::string&(const std::shared_ptr<ModelAPI_Attribute>& theAttr));
-  MOCK_METHOD1(isEqual,
-      bool(const std::shared_ptr<ModelAPI_Data>& theData));
-  MOCK_METHOD0(isValid,
-      bool());
-  MOCK_METHOD2(addAttribute,
-      std::shared_ptr<ModelAPI_Attribute>(const std::string& theID, const std::string theAttrType));
-  MOCK_METHOD1(sendAttributeUpdated,
-      void(ModelAPI_Attribute* theAttr));
-  MOCK_METHOD1(blockSendAttributeUpdated,
-      void(const bool theBlock));
-  MOCK_METHOD0(erase,
-      void());
-  MOCK_METHOD1(execState,
-      void(const ModelAPI_ExecState theState));
-  MOCK_METHOD0(execState,
-      ModelAPI_ExecState());
-  MOCK_METHOD2(setError,
-      void(const std::string& theError, bool theSend));
-  MOCK_CONST_METHOD0(error,
-      std::string());
-  MOCK_CONST_METHOD0(featureId,
-      int());
-  MOCK_METHOD0(refsToMe,
-      const std::set<std::shared_ptr<ModelAPI_Attribute> >&());
-  MOCK_METHOD1(referencesToObjects,
-      void(std::list<std::pair<std::string, std::list<std::shared_ptr<ModelAPI_Object> > > >& theRefs));
-  MOCK_METHOD1(copyTo,
-      void(std::shared_ptr<ModelAPI_Data> theTarget));
-  MOCK_METHOD0(invalidPtr,
-      std::shared_ptr<ModelAPI_Data>());
-  MOCK_METHOD0(updateID,
-      int());
-  MOCK_METHOD1(setUpdateID,
-      void(const int theID));
-  MOCK_METHOD0(owner,
-      std::shared_ptr<ModelAPI_Object>());
-  MOCK_METHOD0(isDeleted,
-      bool());
-  MOCK_METHOD1(setIsDeleted,
-      void(const bool theFlag));
-  MOCK_METHOD0(isInHistory,
-      bool());
-  MOCK_METHOD1(setIsInHistory,
-      void(const bool theFlag));
-  MOCK_METHOD0(isDisplayed,
-      bool());
-  MOCK_METHOD1(setDisplayed,
-      void(const bool theDisplay));
-};
-
-#endif // MockModelAPI_Data_H_
diff --git a/src/ConstructionAPI/Test/MockModelAPI_Document.h b/src/ConstructionAPI/Test/MockModelAPI_Document.h
deleted file mode 100644 (file)
index cceea81..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef MockModelAPI_Document_H_
-#define MockModelAPI_Document_H_
-
-#include <gmock/gmock.h>
-
-#include <ModelAPI_Document.h>
-
-class MockModelAPI_Document : public ModelAPI_Document {
- public:
-  MOCK_CONST_METHOD0(kind,
-      const std::string&());
-  MOCK_METHOD1(close,
-      void(bool));
-  MOCK_METHOD2(addFeature,
-      std::shared_ptr<ModelAPI_Feature>(std::string, bool));
-  MOCK_METHOD3(refsToFeature,
-      void(std::shared_ptr<ModelAPI_Feature> theFeature,
-           std::set<std::shared_ptr<ModelAPI_Feature> >& theRefs,
-           const bool isSendError));
-  MOCK_METHOD1(removeFeature,
-      void(std::shared_ptr<ModelAPI_Feature> theFeature));
-  MOCK_METHOD2(moveFeature,
-      void(std::shared_ptr<ModelAPI_Feature> theMoved, std::shared_ptr<ModelAPI_Feature> theAfterThis));
-  MOCK_CONST_METHOD0(id,
-      const int());
-  MOCK_METHOD2(object,
-      std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const int theIndex));
-  MOCK_METHOD2(objectByName,
-      std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const std::string& theName));
-  MOCK_METHOD1(index,
-      const int(std::shared_ptr<ModelAPI_Object> theObject));
-  MOCK_METHOD1(size,
-      int(const std::string& theGroupID));
-  MOCK_METHOD1(currentFeature,
-      std::shared_ptr<ModelAPI_Feature>(const bool theVisible));
-  MOCK_METHOD2(setCurrentFeature,
-      void(std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theVisible));
-  MOCK_METHOD0(setCurrentFeatureUp,
-      void());
-  MOCK_METHOD0(numInternalFeatures,
-      int());
-  MOCK_METHOD1(internalFeature,
-      std::shared_ptr<ModelAPI_Feature>(const int theIndex));
-  MOCK_METHOD0(synchronizeTransactions,
-      void());
-  MOCK_METHOD1(featureById,
-      std::shared_ptr<ModelAPI_Feature>(const int theId));
-  MOCK_METHOD2(createConstruction,
-      std::shared_ptr<ModelAPI_ResultConstruction>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD2(createBody,
-      std::shared_ptr<ModelAPI_ResultBody>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD2(createPart,
-      std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD3(copyPart,
-      std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_ResultPart>& theOrigin,
-                                           const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD2(createGroup,
-      std::shared_ptr<ModelAPI_ResultGroup>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD2(createParameter,
-      std::shared_ptr<ModelAPI_ResultParameter>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
-  MOCK_METHOD1(feature,
-      std::shared_ptr<ModelAPI_Feature>(const std::shared_ptr<ModelAPI_Result>& theResult));
-  MOCK_METHOD0(allFeatures,
-      std::list<std::shared_ptr<ModelAPI_Feature> >());
-  MOCK_METHOD1(setActive,
-      void(const bool theFlag));
-  MOCK_CONST_METHOD0(isActive,
-      bool());
-  MOCK_METHOD0(isOpened,
-      bool());
-  MOCK_METHOD2(producedByFeature,
-      std::shared_ptr<ModelAPI_Feature>(std::shared_ptr<ModelAPI_Result> theResult, const std::shared_ptr<GeomAPI_Shape>& theShape));
-  MOCK_CONST_METHOD2(isLater,
-      bool(std::shared_ptr<ModelAPI_Feature> theLater, std::shared_ptr<ModelAPI_Feature> theCurrent));
-  MOCK_METHOD1(updateHistory,
-      void(const std::shared_ptr<ModelAPI_Object> theObject));
-  MOCK_METHOD1(updateHistory,
-      void(const std::string theGroup));
-};
-
-#endif // MockMockModelAPI_Document_H_
-
diff --git a/src/ConstructionAPI/Test/MockModelAPI_Feature.h b/src/ConstructionAPI/Test/MockModelAPI_Feature.h
deleted file mode 100644 (file)
index 47ef1f3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef MockModelAPI_Feature_H_
-#define MockModelAPI_Feature_H_
-
-#include <gmock/gmock.h>
-
-#include <ModelAPI_Feature.h>
-
-class MockModelAPI_Feature : public ModelAPI_Feature {
-  // ModelAPI_Object
- public:
-  MOCK_METHOD0(groupName,
-      std::string());
-  MOCK_METHOD0(initAttributes,
-      void());
-  MOCK_METHOD0(isDisabled,
-      bool());
-  MOCK_METHOD3(colorConfigInfo,
-      void(std::string& theSection, std::string& theName, std::string& theDefault));
-  MOCK_METHOD0(init,
-      void());
-  MOCK_CONST_METHOD0(data,
-      std::shared_ptr<ModelAPI_Data>());
-
-  // ModelAPI_Feature
- public:
-  MOCK_METHOD0(getKind,
-      const std::string&());
-  MOCK_CONST_METHOD0(document,
-      std::shared_ptr<ModelAPI_Document>());
-  MOCK_METHOD0(execute,
-      void());
-  MOCK_METHOD1(compute,
-      bool(const std::string& theAttributeId));
-  MOCK_METHOD2(setError,
-      void(std::string, bool));
-  MOCK_CONST_METHOD0(error,
-      std::string());
-  MOCK_METHOD0(isPersistentResult,
-      bool());
-  MOCK_METHOD0(isAction,
-      bool());
-};
-
-#endif // MockModelAPI_Feature_H_
diff --git a/src/ConstructionAPI/Test/MockModelAPI_Object.h b/src/ConstructionAPI/Test/MockModelAPI_Object.h
deleted file mode 100644 (file)
index ad865af..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef MockModelAPI_Object_H_
-#define MockModelAPI_Object_H_
-
-#include <gmock/gmock.h>
-
-#include <ModelAPI_Object.h>
-
-class MockModelAPI_Object : public ModelAPI_Object {
- public:
-  MOCK_METHOD0(groupName,
-      std::string());
-  MOCK_METHOD0(initAttributes,
-      void());
-  MOCK_METHOD0(isDisabled,
-      bool());
-  MOCK_METHOD3(colorConfigInfo,
-      void(std::string& theSection, std::string& theName, std::string& theDefault));
-  MOCK_METHOD0(init,
-      virtual void MODELAPI_EXPORT());
-};
-
-#endif // MockModelAPI_Object_H_
diff --git a/src/ModelHighAPI/Mock/MockModelAPI_AttributeDouble.h b/src/ModelHighAPI/Mock/MockModelAPI_AttributeDouble.h
new file mode 100644 (file)
index 0000000..a3d1fc0
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+#ifndef MockModelAPI_AttributeDouble_H_
+#define MockModelAPI_AttributeDouble_H_
+
+#include <gmock/gmock.h>
+
+#include <ModelAPI_AttributeDouble.h>
+
+class MockModelAPI_AttributeDouble : public ModelAPI_AttributeDouble {
+ public:
+  MOCK_METHOD1(setValue,
+      void(const double theValue));
+  MOCK_METHOD0(value,
+      double());
+  MOCK_METHOD1(setCalculatedValue,
+      void(const double theValue));
+  MOCK_METHOD1(setText,
+      void(const std::string& theText));
+  MOCK_METHOD0(text,
+      std::string());
+  MOCK_METHOD1(setExpressionInvalid,
+      void(const bool theFlag));
+  MOCK_METHOD0(expressionInvalid,
+      bool());
+  MOCK_METHOD1(setExpressionError,
+      void(const std::string& theError));
+  MOCK_METHOD0(expressionError,
+      std::string());
+  MOCK_METHOD1(setUsedParameters,
+      void(const std::set<std::string>& theUsedParameters));
+  MOCK_CONST_METHOD0(usedParameters,
+      std::set<std::string>());
+};
+
+#endif // MockModelAPI_AttributeDouble_H_
diff --git a/src/ModelHighAPI/Mock/MockModelAPI_Data.h b/src/ModelHighAPI/Mock/MockModelAPI_Data.h
new file mode 100644 (file)
index 0000000..c8f99a7
--- /dev/null
@@ -0,0 +1,98 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+#ifndef MockModelAPI_Data_H_
+#define MockModelAPI_Data_H_
+
+#include <gmock/gmock.h>
+
+#include <ModelAPI_Data.h>
+
+class MockModelAPI_Data : public ModelAPI_Data {
+ public:
+  MOCK_METHOD0(name,
+      std::string());
+  MOCK_METHOD1(setName,
+      void(const std::string& theName));
+  MOCK_METHOD1(document,
+      std::shared_ptr<ModelAPI_AttributeDocRef>(const std::string& theID));
+  MOCK_METHOD1(real,
+      std::shared_ptr<ModelAPI_AttributeDouble>(const std::string& theID));
+  MOCK_METHOD1(integer,
+      std::shared_ptr<ModelAPI_AttributeInteger>(const std::string& theID));
+  MOCK_METHOD1(reference,
+      std::shared_ptr<ModelAPI_AttributeReference>(const std::string& theID));
+  MOCK_METHOD1(selection,
+      std::shared_ptr<ModelAPI_AttributeSelection>(const std::string& theID));
+  MOCK_METHOD1(selectionList,
+      std::shared_ptr<ModelAPI_AttributeSelectionList>(const std::string& theID));
+  MOCK_METHOD1(refattr,
+      std::shared_ptr<ModelAPI_AttributeRefAttr>(const std::string& theID));
+  MOCK_METHOD1(reflist,
+      std::shared_ptr<ModelAPI_AttributeRefList>(const std::string& theID));
+  MOCK_METHOD1(refattrlist,
+      std::shared_ptr<ModelAPI_AttributeRefAttrList>(const std::string& theID));
+  MOCK_METHOD1(boolean,
+      std::shared_ptr<ModelAPI_AttributeBoolean>(const std::string& theID));
+  MOCK_METHOD1(string,
+      std::shared_ptr<ModelAPI_AttributeString>(const std::string& theID));
+  MOCK_METHOD1(intArray,
+      std::shared_ptr<ModelAPI_AttributeIntArray>(const std::string& theID));
+  MOCK_METHOD1(attribute,
+      std::shared_ptr<ModelAPI_Attribute>(const std::string& theID));
+  MOCK_METHOD1(attributes,
+      std::list<std::shared_ptr<ModelAPI_Attribute> >(const std::string& theType));
+  MOCK_METHOD1(attributesIDs,
+      std::list<std::string>(const std::string& theType));
+  MOCK_METHOD1(id,
+      const std::string&(const std::shared_ptr<ModelAPI_Attribute>& theAttr));
+  MOCK_METHOD1(isEqual,
+      bool(const std::shared_ptr<ModelAPI_Data>& theData));
+  MOCK_METHOD0(isValid,
+      bool());
+  MOCK_METHOD2(addAttribute,
+      std::shared_ptr<ModelAPI_Attribute>(const std::string& theID, const std::string theAttrType));
+  MOCK_METHOD1(sendAttributeUpdated,
+      void(ModelAPI_Attribute* theAttr));
+  MOCK_METHOD1(blockSendAttributeUpdated,
+      void(const bool theBlock));
+  MOCK_METHOD0(erase,
+      void());
+  MOCK_METHOD1(execState,
+      void(const ModelAPI_ExecState theState));
+  MOCK_METHOD0(execState,
+      ModelAPI_ExecState());
+  MOCK_METHOD2(setError,
+      void(const std::string& theError, bool theSend));
+  MOCK_CONST_METHOD0(error,
+      std::string());
+  MOCK_CONST_METHOD0(featureId,
+      int());
+  MOCK_METHOD0(refsToMe,
+      const std::set<std::shared_ptr<ModelAPI_Attribute> >&());
+  MOCK_METHOD1(referencesToObjects,
+      void(std::list<std::pair<std::string, std::list<std::shared_ptr<ModelAPI_Object> > > >& theRefs));
+  MOCK_METHOD1(copyTo,
+      void(std::shared_ptr<ModelAPI_Data> theTarget));
+  MOCK_METHOD0(invalidPtr,
+      std::shared_ptr<ModelAPI_Data>());
+  MOCK_METHOD0(updateID,
+      int());
+  MOCK_METHOD1(setUpdateID,
+      void(const int theID));
+  MOCK_METHOD0(owner,
+      std::shared_ptr<ModelAPI_Object>());
+  MOCK_METHOD0(isDeleted,
+      bool());
+  MOCK_METHOD1(setIsDeleted,
+      void(const bool theFlag));
+  MOCK_METHOD0(isInHistory,
+      bool());
+  MOCK_METHOD1(setIsInHistory,
+      void(const bool theFlag));
+  MOCK_METHOD0(isDisplayed,
+      bool());
+  MOCK_METHOD1(setDisplayed,
+      void(const bool theDisplay));
+};
+
+#endif // MockModelAPI_Data_H_
diff --git a/src/ModelHighAPI/Mock/MockModelAPI_Document.h b/src/ModelHighAPI/Mock/MockModelAPI_Document.h
new file mode 100644 (file)
index 0000000..cceea81
--- /dev/null
@@ -0,0 +1,84 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+#ifndef MockModelAPI_Document_H_
+#define MockModelAPI_Document_H_
+
+#include <gmock/gmock.h>
+
+#include <ModelAPI_Document.h>
+
+class MockModelAPI_Document : public ModelAPI_Document {
+ public:
+  MOCK_CONST_METHOD0(kind,
+      const std::string&());
+  MOCK_METHOD1(close,
+      void(bool));
+  MOCK_METHOD2(addFeature,
+      std::shared_ptr<ModelAPI_Feature>(std::string, bool));
+  MOCK_METHOD3(refsToFeature,
+      void(std::shared_ptr<ModelAPI_Feature> theFeature,
+           std::set<std::shared_ptr<ModelAPI_Feature> >& theRefs,
+           const bool isSendError));
+  MOCK_METHOD1(removeFeature,
+      void(std::shared_ptr<ModelAPI_Feature> theFeature));
+  MOCK_METHOD2(moveFeature,
+      void(std::shared_ptr<ModelAPI_Feature> theMoved, std::shared_ptr<ModelAPI_Feature> theAfterThis));
+  MOCK_CONST_METHOD0(id,
+      const int());
+  MOCK_METHOD2(object,
+      std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const int theIndex));
+  MOCK_METHOD2(objectByName,
+      std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const std::string& theName));
+  MOCK_METHOD1(index,
+      const int(std::shared_ptr<ModelAPI_Object> theObject));
+  MOCK_METHOD1(size,
+      int(const std::string& theGroupID));
+  MOCK_METHOD1(currentFeature,
+      std::shared_ptr<ModelAPI_Feature>(const bool theVisible));
+  MOCK_METHOD2(setCurrentFeature,
+      void(std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theVisible));
+  MOCK_METHOD0(setCurrentFeatureUp,
+      void());
+  MOCK_METHOD0(numInternalFeatures,
+      int());
+  MOCK_METHOD1(internalFeature,
+      std::shared_ptr<ModelAPI_Feature>(const int theIndex));
+  MOCK_METHOD0(synchronizeTransactions,
+      void());
+  MOCK_METHOD1(featureById,
+      std::shared_ptr<ModelAPI_Feature>(const int theId));
+  MOCK_METHOD2(createConstruction,
+      std::shared_ptr<ModelAPI_ResultConstruction>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD2(createBody,
+      std::shared_ptr<ModelAPI_ResultBody>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD2(createPart,
+      std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD3(copyPart,
+      std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_ResultPart>& theOrigin,
+                                           const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD2(createGroup,
+      std::shared_ptr<ModelAPI_ResultGroup>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD2(createParameter,
+      std::shared_ptr<ModelAPI_ResultParameter>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
+  MOCK_METHOD1(feature,
+      std::shared_ptr<ModelAPI_Feature>(const std::shared_ptr<ModelAPI_Result>& theResult));
+  MOCK_METHOD0(allFeatures,
+      std::list<std::shared_ptr<ModelAPI_Feature> >());
+  MOCK_METHOD1(setActive,
+      void(const bool theFlag));
+  MOCK_CONST_METHOD0(isActive,
+      bool());
+  MOCK_METHOD0(isOpened,
+      bool());
+  MOCK_METHOD2(producedByFeature,
+      std::shared_ptr<ModelAPI_Feature>(std::shared_ptr<ModelAPI_Result> theResult, const std::shared_ptr<GeomAPI_Shape>& theShape));
+  MOCK_CONST_METHOD2(isLater,
+      bool(std::shared_ptr<ModelAPI_Feature> theLater, std::shared_ptr<ModelAPI_Feature> theCurrent));
+  MOCK_METHOD1(updateHistory,
+      void(const std::shared_ptr<ModelAPI_Object> theObject));
+  MOCK_METHOD1(updateHistory,
+      void(const std::string theGroup));
+};
+
+#endif // MockMockModelAPI_Document_H_
+
diff --git a/src/ModelHighAPI/Mock/MockModelAPI_Feature.h b/src/ModelHighAPI/Mock/MockModelAPI_Feature.h
new file mode 100644 (file)
index 0000000..47ef1f3
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+#ifndef MockModelAPI_Feature_H_
+#define MockModelAPI_Feature_H_
+
+#include <gmock/gmock.h>
+
+#include <ModelAPI_Feature.h>
+
+class MockModelAPI_Feature : public ModelAPI_Feature {
+  // ModelAPI_Object
+ public:
+  MOCK_METHOD0(groupName,
+      std::string());
+  MOCK_METHOD0(initAttributes,
+      void());
+  MOCK_METHOD0(isDisabled,
+      bool());
+  MOCK_METHOD3(colorConfigInfo,
+      void(std::string& theSection, std::string& theName, std::string& theDefault));
+  MOCK_METHOD0(init,
+      void());
+  MOCK_CONST_METHOD0(data,
+      std::shared_ptr<ModelAPI_Data>());
+
+  // ModelAPI_Feature
+ public:
+  MOCK_METHOD0(getKind,
+      const std::string&());
+  MOCK_CONST_METHOD0(document,
+      std::shared_ptr<ModelAPI_Document>());
+  MOCK_METHOD0(execute,
+      void());
+  MOCK_METHOD1(compute,
+      bool(const std::string& theAttributeId));
+  MOCK_METHOD2(setError,
+      void(std::string, bool));
+  MOCK_CONST_METHOD0(error,
+      std::string());
+  MOCK_METHOD0(isPersistentResult,
+      bool());
+  MOCK_METHOD0(isAction,
+      bool());
+};
+
+#endif // MockModelAPI_Feature_H_
diff --git a/src/ModelHighAPI/Mock/MockModelAPI_Object.h b/src/ModelHighAPI/Mock/MockModelAPI_Object.h
new file mode 100644 (file)
index 0000000..ad865af
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+#ifndef MockModelAPI_Object_H_
+#define MockModelAPI_Object_H_
+
+#include <gmock/gmock.h>
+
+#include <ModelAPI_Object.h>
+
+class MockModelAPI_Object : public ModelAPI_Object {
+ public:
+  MOCK_METHOD0(groupName,
+      std::string());
+  MOCK_METHOD0(initAttributes,
+      void());
+  MOCK_METHOD0(isDisabled,
+      bool());
+  MOCK_METHOD3(colorConfigInfo,
+      void(std::string& theSection, std::string& theName, std::string& theDefault));
+  MOCK_METHOD0(init,
+      virtual void MODELAPI_EXPORT());
+};
+
+#endif // MockModelAPI_Object_H_