14af83db5SShawn McCarney /** 24af83db5SShawn McCarney * Copyright © 2024 IBM Corporation 34af83db5SShawn McCarney * 44af83db5SShawn McCarney * Licensed under the Apache License, Version 2.0 (the "License"); 54af83db5SShawn McCarney * you may not use this file except in compliance with the License. 64af83db5SShawn McCarney * You may obtain a copy of the License at 74af83db5SShawn McCarney * 84af83db5SShawn McCarney * http://www.apache.org/licenses/LICENSE-2.0 94af83db5SShawn McCarney * 104af83db5SShawn McCarney * Unless required by applicable law or agreed to in writing, software 114af83db5SShawn McCarney * distributed under the License is distributed on an "AS IS" BASIS, 124af83db5SShawn McCarney * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134af83db5SShawn McCarney * See the License for the specific language governing permissions and 144af83db5SShawn McCarney * limitations under the License. 154af83db5SShawn McCarney */ 164af83db5SShawn McCarney #pragma once 174af83db5SShawn McCarney 184af83db5SShawn McCarney #include "power_sequencer_device.hpp" 194af83db5SShawn McCarney 204af83db5SShawn McCarney #include <gmock/gmock.h> 214af83db5SShawn McCarney 224af83db5SShawn McCarney namespace phosphor::power::sequencer 234af83db5SShawn McCarney { 244af83db5SShawn McCarney 254af83db5SShawn McCarney /** 264af83db5SShawn McCarney * @class MockDevice 274af83db5SShawn McCarney * 284af83db5SShawn McCarney * Mock implementation of the PowerSequencerDevice interface. 294af83db5SShawn McCarney */ 304af83db5SShawn McCarney class MockDevice : public PowerSequencerDevice 314af83db5SShawn McCarney { 324af83db5SShawn McCarney public: 334af83db5SShawn McCarney // Specify which compiler-generated methods we want 344af83db5SShawn McCarney MockDevice() = default; 354af83db5SShawn McCarney MockDevice(const MockDevice&) = delete; 364af83db5SShawn McCarney MockDevice(MockDevice&&) = delete; 374af83db5SShawn McCarney MockDevice& operator=(const MockDevice&) = delete; 384af83db5SShawn McCarney MockDevice& operator=(MockDevice&&) = delete; 394af83db5SShawn McCarney virtual ~MockDevice() = default; 404af83db5SShawn McCarney 414af83db5SShawn McCarney MOCK_METHOD(const std::string&, getName, (), (const, override)); 42f47a7a72SShawn McCarney MOCK_METHOD(const std::vector<std::unique_ptr<Rail>>&, getRails, (), 43f47a7a72SShawn McCarney (const, override)); 44*fc3f31fbSShawn McCarney MOCK_METHOD(std::vector<int>, getGPIOValues, (Services & services), 45*fc3f31fbSShawn McCarney (override)); 464af83db5SShawn McCarney MOCK_METHOD(uint16_t, getStatusWord, (uint8_t page), (override)); 474af83db5SShawn McCarney MOCK_METHOD(uint8_t, getStatusVout, (uint8_t page), (override)); 484af83db5SShawn McCarney MOCK_METHOD(double, getReadVout, (uint8_t page), (override)); 494af83db5SShawn McCarney MOCK_METHOD(double, getVoutUVFaultLimit, (uint8_t page), (override)); 50472101c5SShawn McCarney MOCK_METHOD(std::string, findPgoodFault, 51f47a7a72SShawn McCarney (Services & services, const std::string& powerSupplyError, 5224956598SShawn McCarney (std::map<std::string, std::string> & additionalData)), 534af83db5SShawn McCarney (override)); 544af83db5SShawn McCarney }; 554af83db5SShawn McCarney 564af83db5SShawn McCarney } // namespace phosphor::power::sequencer 57