Commit b423678f authored by Matthias Greuter's avatar Matthias Greuter
Browse files

Extend MockEntities for proper usage in tests

parent 705d8cbf
......@@ -126,7 +126,7 @@ class MockQueryService : public mantle_api::ILaneLocationQueryService
class MockPedestrian : public mantle_api::IPedestrian
{
public:
mantle_api::UniqueId GetUniqueId() const override { return 0; }
MOCK_METHOD(mantle_api::UniqueId, GetUniqueId, (), (const, override));
void SetName(const std::string& name) override { name_ = name; }
const std::string& GetName() const override { return name_; }
......@@ -155,7 +155,7 @@ class MockPedestrian : public mantle_api::IPedestrian
MOCK_METHOD(void, SetAssignedLaneIds, (const std::vector<std::uint64_t>& ids), (override));
MOCK_METHOD(std::vector<std::uint64_t>, GetAssignedLaneIds, (), (const, override));
void SetProperties(std::unique_ptr<mantle_api::EntityProperties> properties) override { std::ignore = properties; }
void SetProperties(std::unique_ptr<mantle_api::EntityProperties> properties) override { properties_ = std::move(properties); }
mantle_api::PedestrianProperties* GetProperties() const override
{
return static_cast<mantle_api::PedestrianProperties*>(properties_.get());
......@@ -169,7 +169,7 @@ class MockPedestrian : public mantle_api::IPedestrian
class MockStaticObject : public mantle_api::IStaticObject
{
public:
mantle_api::UniqueId GetUniqueId() const override { return 0; }
MOCK_METHOD(mantle_api::UniqueId, GetUniqueId, (), (const, override));
void SetName(const std::string& name) override { name_ = name; }
const std::string& GetName() const override { return name_; }
......@@ -198,7 +198,7 @@ class MockStaticObject : public mantle_api::IStaticObject
MOCK_METHOD(void, SetAssignedLaneIds, (const std::vector<std::uint64_t>& ids), (override));
MOCK_METHOD(std::vector<std::uint64_t>, GetAssignedLaneIds, (), (const, override));
void SetProperties(std::unique_ptr<mantle_api::EntityProperties> properties) override { std::ignore = properties; }
void SetProperties(std::unique_ptr<mantle_api::EntityProperties> properties) override { properties_ = std::move(properties); }
mantle_api::StaticObjectProperties* GetProperties() const override
{
return static_cast<mantle_api::StaticObjectProperties*>(properties_.get());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment