Patrick Venture | 8e801e1 | 2019-05-20 13:42:45 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "status.hpp" |
| 4 | #include "update.hpp" |
| 5 | |
| 6 | #include <memory> |
| 7 | #include <vector> |
| 8 | |
Patrick Venture | 27ac582 | 2019-05-20 17:39:31 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
Patrick Venture | 8e801e1 | 2019-05-20 13:42:45 -0700 | [diff] [blame] | 10 | |
| 11 | namespace ipmi_flash |
| 12 | { |
| 13 | |
| 14 | class UpdateMock : public UpdateInterface |
| 15 | { |
| 16 | public: |
| 17 | MOCK_METHOD0(triggerUpdate, bool()); |
| 18 | MOCK_METHOD0(abortUpdate, void()); |
Patrick Venture | da66fd8 | 2019-06-03 11:11:24 -0700 | [diff] [blame] | 19 | MOCK_METHOD0(status, ActionStatus()); |
Patrick Venture | 8e801e1 | 2019-05-20 13:42:45 -0700 | [diff] [blame] | 20 | }; |
| 21 | |
Patrick Venture | 27ac582 | 2019-05-20 17:39:31 -0700 | [diff] [blame] | 22 | std::unique_ptr<UpdateInterface> CreateUpdateMock() |
| 23 | { |
| 24 | return std::make_unique<UpdateMock>(); |
| 25 | } |
| 26 | |
Patrick Venture | 8e801e1 | 2019-05-20 13:42:45 -0700 | [diff] [blame] | 27 | } // namespace ipmi_flash |