1 // 2 // Copyright (C) 2011 The Android Open Source Project 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 #ifndef SHILL_MOCK_PROPERTY_STORE_H_ 18 #define SHILL_MOCK_PROPERTY_STORE_H_ 19 20 #include <string> 21 22 #include <base/macros.h> 23 #include <gmock/gmock.h> 24 25 #include "shill/property_store.h" 26 27 namespace shill { 28 29 class MockPropertyStore : public PropertyStore { 30 public: 31 MockPropertyStore(); 32 ~MockPropertyStore() override; 33 34 MOCK_CONST_METHOD1(Contains, bool(const std::string&)); 35 MOCK_METHOD3(SetBoolProperty, bool(const std::string&, bool, Error*)); 36 MOCK_METHOD3(SetInt16Property, bool(const std::string&, int16_t, Error*)); 37 MOCK_METHOD3(SetInt32Property, bool(const std::string&, int32_t, Error*)); 38 MOCK_METHOD3(SetStringProperty, bool(const std::string&, 39 const std::string&, 40 Error*)); 41 MOCK_METHOD3(SetStringmapProperty, bool(const std::string&, 42 const Stringmap&, 43 Error*)); 44 MOCK_METHOD3(SetStringsProperty, bool(const std::string&, 45 const Strings&, 46 Error*)); 47 MOCK_METHOD3(SetUint8Property, bool(const std::string&, uint8_t, Error*)); 48 MOCK_METHOD3(SetUint16Property, bool(const std::string&, uint16_t, Error*)); 49 MOCK_METHOD3(SetUint16sProperty, bool(const std::string&, 50 const Uint16s&, Error*)); 51 MOCK_METHOD3(SetUint32Property, bool(const std::string&, uint32_t, Error*)); 52 MOCK_METHOD3(SetUint64Property, bool(const std::string&, uint64_t, Error*)); 53 MOCK_METHOD2(ClearProperty, bool(const std::string&, Error*)); 54 55 private: 56 DISALLOW_COPY_AND_ASSIGN(MockPropertyStore); 57 }; 58 59 } // namespace shill 60 61 #endif // SHILL_MOCK_PROPERTY_STORE_H_ 62