Quick fix for missing methods in EndpointChannel class

All changes tagged with TODO(jfcarroll) should be reviewed, these are likely not correct changes.

PiperOrigin-RevId: 413948514
This commit is contained in:
jfcarroll
2021-12-03 09:06:25 -08:00
committed by Copybara-Service
parent e1cf7a9e9f
commit 31465e1ce3
2 changed files with 23 additions and 0 deletions
@@ -52,6 +52,19 @@ class FakeEndpointChannel : public EndpointChannel {
void Close(proto::connections::DisconnectionReason reason) override {
Close();
}
// TODO(jfcarroll): This needs to be fixed properly
proto::connections::ConnectionTechnology GetTechnology() const override {
return proto::connections::ConnectionTechnology::
CONNECTION_TECHNOLOGY_BLE_GATT;
}
// TODO(jfcarroll): This needs to be fixed properly
proto::connections::ConnectionBand GetBand() const override {
return proto::connections::ConnectionBand::CONNECTION_BAND_CELLULAR_BAND_2G;
}
// TODO(jfcarroll): This needs to be fixed properly
int GetFrequency() const override { return 0; }
// TODO(jfcarroll): This needs to be fixed properly
int GetTryCount() const override { return 0; }
std::string GetType() const override { return "fake-channel-type"; }
std::string GetName() const override { return "fake-channel"; }
Medium GetMedium() const override { return Medium::BLE; }
@@ -53,6 +53,16 @@ class MockEndpointChannel : public EndpointChannel {
MOCK_METHOD(Exception, Write, (const ByteArray& data), (override));
MOCK_METHOD(void, Close, (), (override));
MOCK_METHOD(void, Close, (DisconnectionReason reason), (override));
// TODO(jfcarroll): This needs to be fixed properly
MOCK_METHOD(proto::connections::ConnectionTechnology, GetTechnology, (),
(const override));
// TODO(jfcarroll): This needs to be fixed properly
MOCK_METHOD(proto::connections::ConnectionBand, GetBand, (),
(const override));
// TODO(jfcarroll): This needs to be fixed properly
MOCK_METHOD(int, GetFrequency, (), (const override));
// TODO(jfcarroll): This needs to be fixed properly
MOCK_METHOD(int, GetTryCount, (), (const override));
MOCK_METHOD(std::string, GetType, (), (const override));
MOCK_METHOD(std::string, GetName, (), (const override));
MOCK_METHOD(Medium, GetMedium, (), (const override));