1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #ifndef MockModelAPI_Data_H_
4 #define MockModelAPI_Data_H_
6 #include <gmock/gmock.h>
8 #include <ModelAPI_Data.h>
10 class MockModelAPI_Data : public ModelAPI_Data {
15 void(const std::string& theName));
16 MOCK_METHOD1(document,
17 std::shared_ptr<ModelAPI_AttributeDocRef>(const std::string& theID));
19 std::shared_ptr<ModelAPI_AttributeDouble>(const std::string& theID));
21 std::shared_ptr<ModelAPI_AttributeInteger>(const std::string& theID));
22 MOCK_METHOD1(reference,
23 std::shared_ptr<ModelAPI_AttributeReference>(const std::string& theID));
24 MOCK_METHOD1(selection,
25 std::shared_ptr<ModelAPI_AttributeSelection>(const std::string& theID));
26 MOCK_METHOD1(selectionList,
27 std::shared_ptr<ModelAPI_AttributeSelectionList>(const std::string& theID));
29 std::shared_ptr<ModelAPI_AttributeRefAttr>(const std::string& theID));
31 std::shared_ptr<ModelAPI_AttributeRefList>(const std::string& theID));
32 MOCK_METHOD1(refattrlist,
33 std::shared_ptr<ModelAPI_AttributeRefAttrList>(const std::string& theID));
35 std::shared_ptr<ModelAPI_AttributeBoolean>(const std::string& theID));
37 std::shared_ptr<ModelAPI_AttributeString>(const std::string& theID));
38 MOCK_METHOD1(intArray,
39 std::shared_ptr<ModelAPI_AttributeIntArray>(const std::string& theID));
40 MOCK_METHOD1(attribute,
41 std::shared_ptr<ModelAPI_Attribute>(const std::string& theID));
42 MOCK_METHOD1(attributes,
43 std::list<std::shared_ptr<ModelAPI_Attribute> >(const std::string& theType));
44 MOCK_METHOD1(attributesIDs,
45 std::list<std::string>(const std::string& theType));
47 const std::string&(const std::shared_ptr<ModelAPI_Attribute>& theAttr));
49 bool(const std::shared_ptr<ModelAPI_Data>& theData));
52 MOCK_METHOD2(addAttribute,
53 std::shared_ptr<ModelAPI_Attribute>(const std::string& theID, const std::string theAttrType));
54 MOCK_METHOD1(sendAttributeUpdated,
55 void(ModelAPI_Attribute* theAttr));
56 MOCK_METHOD1(blockSendAttributeUpdated,
57 void(const bool theBlock));
60 MOCK_METHOD1(execState,
61 void(const ModelAPI_ExecState theState));
62 MOCK_METHOD0(execState,
63 ModelAPI_ExecState());
64 MOCK_METHOD2(setError,
65 void(const std::string& theError, bool theSend));
66 MOCK_CONST_METHOD0(error,
68 MOCK_CONST_METHOD0(featureId,
70 MOCK_METHOD0(refsToMe,
71 const std::set<std::shared_ptr<ModelAPI_Attribute> >&());
72 MOCK_METHOD1(referencesToObjects,
73 void(std::list<std::pair<std::string, std::list<std::shared_ptr<ModelAPI_Object> > > >& theRefs));
75 void(std::shared_ptr<ModelAPI_Data> theTarget));
76 MOCK_METHOD0(invalidPtr,
77 std::shared_ptr<ModelAPI_Data>());
78 MOCK_METHOD0(updateID,
80 MOCK_METHOD1(setUpdateID,
81 void(const int theID));
83 std::shared_ptr<ModelAPI_Object>());
84 MOCK_METHOD0(isDeleted,
86 MOCK_METHOD1(setIsDeleted,
87 void(const bool theFlag));
88 MOCK_METHOD0(isInHistory,
90 MOCK_METHOD1(setIsInHistory,
91 void(const bool theFlag));
92 MOCK_METHOD0(isDisplayed,
94 MOCK_METHOD1(setDisplayed,
95 void(const bool theDisplay));
98 #endif // MockModelAPI_Data_H_