From 31465e1ce35943248faee177dd75636a14738f6c Mon Sep 17 00:00:00 2001 From: jfcarroll Date: Fri, 3 Dec 2021 09:05:50 -0800 Subject: [PATCH] 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 --- cpp/core/internal/encryption_runner_test.cc | 13 +++++++++++++ cpp/core/internal/endpoint_manager_test.cc | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/cpp/core/internal/encryption_runner_test.cc b/cpp/core/internal/encryption_runner_test.cc index 06720e33..3b81e684 100644 --- a/cpp/core/internal/encryption_runner_test.cc +++ b/cpp/core/internal/encryption_runner_test.cc @@ -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; } diff --git a/cpp/core/internal/endpoint_manager_test.cc b/cpp/core/internal/endpoint_manager_test.cc index dae1057b..0cf79af1 100644 --- a/cpp/core/internal/endpoint_manager_test.cc +++ b/cpp/core/internal/endpoint_manager_test.cc @@ -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));