1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #ifndef MockModelAPI_Document_H_
4 #define MockModelAPI_Document_H_
6 #include <gmock/gmock.h>
8 #include <ModelAPI_Document.h>
10 class MockModelAPI_Document : public ModelAPI_Document {
12 MOCK_CONST_METHOD0(kind,
13 const std::string&());
16 MOCK_METHOD2(addFeature,
17 std::shared_ptr<ModelAPI_Feature>(std::string, bool));
18 MOCK_METHOD3(refsToFeature,
19 void(std::shared_ptr<ModelAPI_Feature> theFeature,
20 std::set<std::shared_ptr<ModelAPI_Feature> >& theRefs,
21 const bool isSendError));
22 MOCK_METHOD1(removeFeature,
23 void(std::shared_ptr<ModelAPI_Feature> theFeature));
24 MOCK_METHOD2(moveFeature,
25 void(std::shared_ptr<ModelAPI_Feature> theMoved, std::shared_ptr<ModelAPI_Feature> theAfterThis));
26 MOCK_CONST_METHOD0(id,
29 std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const int theIndex));
30 MOCK_METHOD2(objectByName,
31 std::shared_ptr<ModelAPI_Object>(const std::string& theGroupID, const std::string& theName));
33 const int(std::shared_ptr<ModelAPI_Object> theObject));
35 int(const std::string& theGroupID));
36 MOCK_METHOD1(currentFeature,
37 std::shared_ptr<ModelAPI_Feature>(const bool theVisible));
38 MOCK_METHOD2(setCurrentFeature,
39 void(std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theVisible));
40 MOCK_METHOD0(setCurrentFeatureUp,
42 MOCK_METHOD0(numInternalFeatures,
44 MOCK_METHOD1(internalFeature,
45 std::shared_ptr<ModelAPI_Feature>(const int theIndex));
46 MOCK_METHOD0(synchronizeTransactions,
48 MOCK_METHOD1(featureById,
49 std::shared_ptr<ModelAPI_Feature>(const int theId));
50 MOCK_METHOD2(createConstruction,
51 std::shared_ptr<ModelAPI_ResultConstruction>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
52 MOCK_METHOD2(createBody,
53 std::shared_ptr<ModelAPI_ResultBody>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
54 MOCK_METHOD2(createPart,
55 std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
56 MOCK_METHOD3(copyPart,
57 std::shared_ptr<ModelAPI_ResultPart>(const std::shared_ptr<ModelAPI_ResultPart>& theOrigin,
58 const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
59 MOCK_METHOD2(createGroup,
60 std::shared_ptr<ModelAPI_ResultGroup>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
61 MOCK_METHOD2(createParameter,
62 std::shared_ptr<ModelAPI_ResultParameter>(const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex));
64 std::shared_ptr<ModelAPI_Feature>(const std::shared_ptr<ModelAPI_Result>& theResult));
65 MOCK_METHOD0(allFeatures,
66 std::list<std::shared_ptr<ModelAPI_Feature> >());
67 MOCK_METHOD1(setActive,
68 void(const bool theFlag));
69 MOCK_CONST_METHOD0(isActive,
71 MOCK_METHOD0(isOpened,
73 MOCK_METHOD2(producedByFeature,
74 std::shared_ptr<ModelAPI_Feature>(std::shared_ptr<ModelAPI_Result> theResult, const std::shared_ptr<GeomAPI_Shape>& theShape));
75 MOCK_CONST_METHOD2(isLater,
76 bool(std::shared_ptr<ModelAPI_Feature> theLater, std::shared_ptr<ModelAPI_Feature> theCurrent));
77 MOCK_METHOD1(updateHistory,
78 void(const std::shared_ptr<ModelAPI_Object> theObject));
79 MOCK_METHOD1(updateHistory,
80 void(const std::string theGroup));
83 #endif // MockMockModelAPI_Document_H_