/* * Copyright (c) 2023 Fancy Code. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef HAL_CPP_MOCK_H #define HAL_CPP_MOCK_H #include "HalCpp.h" #include "HalTestTool.h" class HalCppTest : public HalCpp { public: HalCppTest() = default; virtual ~HalCppTest() = default; StatusCode GetAllLeds(std::map> &allLeds) override; StatusCode GetAllKeys(std::map> &allKeys) override; StatusCode GetWifiHal(std::shared_ptr &wifi) override; StatusCode GetCameraHal(std::map> &allCameras) override; protected: virtual StatusCode GetAllLedsTrace(std::map> &allLeds); virtual StatusCode GetAllKeysTrace(std::map> &allKeys); virtual StatusCode GetWifiHalTrace(std::shared_ptr &wifi); virtual StatusCode GetCameraHalTrace(std::map> &allCameras); }; class HalCppMock : public HalCppTest { public: HalCppMock() = default; virtual ~HalCppMock() = default; MOCK_METHOD1(GetAllLedsTrace, StatusCode(std::map> &)); MOCK_METHOD1(GetAllKeysTrace, StatusCode(std::map> &)); MOCK_METHOD1(GetWifiHalTrace, StatusCode(std::shared_ptr &)); MOCK_METHOD1(GetCameraHalTrace, StatusCode(std::map> &)); }; #endif