mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
26 lines
548 B
C++
26 lines
548 B
C++
|
#pragma once
|
||
|
#include <llarp/router/router.hpp>
|
||
|
|
||
|
#include "mock_network.hpp"
|
||
|
|
||
|
namespace mocks
|
||
|
{
|
||
|
class MockRouter : public llarp::Router
|
||
|
{
|
||
|
const Network& _net;
|
||
|
|
||
|
public:
|
||
|
explicit MockRouter(const Network& net, std::shared_ptr<llarp::vpn::Platform> vpnPlatform)
|
||
|
: llarp::
|
||
|
Router{std::shared_ptr<llarp::EventLoop>{const_cast<Network*>(&net), [](Network*) {}}, vpnPlatform}
|
||
|
, _net{net}
|
||
|
{}
|
||
|
|
||
|
const llarp::net::Platform&
|
||
|
Net() const override
|
||
|
{
|
||
|
return _net;
|
||
|
};
|
||
|
};
|
||
|
} // namespace mocks
|