#pragma once #include "envoy/server/health_checker_config.h" #include "test/mocks/api/mocks.h" #include "test/mocks/common.h" #include "test/mocks/event/mocks.h" #include "test/mocks/protobuf/mocks.h" #include "test/mocks/router/mocks.h" #include "test/mocks/runtime/mocks.h" #include "test/mocks/upstream/cluster_priority_set.h" #include "test/mocks/upstream/health_check_event_logger.h" #include "test/mocks/upstream/health_checker.h" #include "gmock/gmock.h" namespace Envoy { namespace Server { namespace Configuration { class MockHealthCheckerFactoryContext : public virtual HealthCheckerFactoryContext { public: MockHealthCheckerFactoryContext(); ~MockHealthCheckerFactoryContext() override; MOCK_METHOD(Upstream::Cluster&, cluster, ()); MOCK_METHOD(Event::Dispatcher&, dispatcher, ()); MOCK_METHOD(Envoy::Random::RandomGenerator&, random, ()); MOCK_METHOD(Envoy::Runtime::Loader&, runtime, ()); MOCK_METHOD(Upstream::HealthCheckEventLogger*, eventLogger_, ()); MOCK_METHOD(ProtobufMessage::ValidationVisitor&, messageValidationVisitor, ()); MOCK_METHOD(Api::Api&, api, ()); Upstream::HealthCheckEventLoggerPtr eventLogger() override { return Upstream::HealthCheckEventLoggerPtr(eventLogger_()); } testing::NiceMock cluster_; testing::NiceMock dispatcher_; testing::NiceMock random_; testing::NiceMock runtime_; testing::NiceMock* event_logger_{}; testing::NiceMock api_{}; }; } // namespace Configuration } // namespace Server } // namespace Envoy