Skip to content

Commit

Permalink
🤡 (battery): Mock battery
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Jan 21, 2022
1 parent 954ac87 commit b0a109e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/unit/mocks/mocks/leka/Battery.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Leka - LekaOS
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#ifndef _LEKA_OS_BATTERY_MOCK_H_
#define _LEKA_OS_BATTERY_MOCK_H_

#include "gmock/gmock.h"
#include "interface/drivers/Battery.h"

namespace leka::mock {

class Battery : public interface::Battery
{
public:
MOCK_METHOD(float, getVoltage, (), (override));
MOCK_METHOD(uint8_t, getLevel, (), (override));
MOCK_METHOD(bool, isCharging, (), (override));
};

} // namespace leka::mock

#endif // _LEKA_OS_BATTERY_MOCK_H_

0 comments on commit b0a109e

Please sign in to comment.