]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionAPI/Test/MockModelAPI_Document.h
Salome HOME
Test addPoint
[modules/shaper.git] / src / ConstructionAPI / Test / MockModelAPI_Document.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #ifndef MockModelAPI_Document_H_
4 #define MockModelAPI_Document_H_
5
6 #include <gmock/gmock.h>
7
8 #include <ModelAPI_Document.h>
9
10 class MockModelAPI_Document : public ModelAPI_Document {
11  public:
12   MOCK_CONST_METHOD0(kind,
13       const std::string&());
14   MOCK_METHOD1(close,
15       void(bool));
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,
27       const int());
28   MOCK_METHOD2(object,
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));
32   MOCK_METHOD1(index,
33       const int(std::shared_ptr<ModelAPI_Object> theObject));
34   MOCK_METHOD1(size,
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,
41       void());
42   MOCK_METHOD0(numInternalFeatures,
43       int());
44   MOCK_METHOD1(internalFeature,
45       std::shared_ptr<ModelAPI_Feature>(const int theIndex));
46   MOCK_METHOD0(synchronizeTransactions,
47       void());
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));
63   MOCK_METHOD1(feature,
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,
70       bool());
71   MOCK_METHOD0(isOpened,
72       bool());
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));
81 };
82
83 #endif // MockMockModelAPI_Document_H_
84