| class CLASS_NAME : public COMPONENT_PROTOCOL_NAME, public component_testing::LocalComponent { |
| public: |
| CLASS_NAME(async_dispatcher_t* dispatcher) : dispatcher_(dispatcher) {} |
| |
| // Add your implementation for the mocked functions |
| // void FIDLService1(argsā¦) override { |
| // |
| // } |
| |
| void Start(std::unique_ptr<component_testing::LocalComponentHandles> mock_handles) override { |
| mock_handles_ = std::move(mock_handles); |
| ASSERT_EQ(mock_handles_->outgoing()->AddPublicService(bindings_.GetHandler(this, dispatcher_)), ZX_OK); |
| } |
| |
| private: |
| async_dispatcher_t* dispatcher_; |
| fidl::BindingSet<COMPONENT_PROTOCOL_NAME> bindings_; |
| std::unique_ptr<component_testing::LocalComponentHandles> mock_handles_; |
| } |