Commit 499dc5ab authored by Jay Civelli's avatar Jay Civelli Committed by Commit Bot

Updating the doc of TestConnectionFactory.

Updating the doc of TestConnectionFactory, which I forgot to do when I
changed the API in a previous CL.

Bug: None
Tbr: rockot@chromium.org
Change-Id: I5b3e6d968b686a8a44f2c0d1561351fec394c5af
Reviewed-on: https://chromium-review.googlesource.com/747888Reviewed-by: default avatarJay Civelli <jcivelli@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512991}
parent 010eec6e
...@@ -21,8 +21,9 @@ class Service; ...@@ -21,8 +21,9 @@ class Service;
// machinery. Typical usage should look something like: // machinery. Typical usage should look something like:
// //
// TEST(MyTest, Foo) { // TEST(MyTest, Foo) {
// MyServiceImpl impl; // Your implementation of service_manager::Service // // Your implementation of service_manager::Service.
// TestConnectorFactory connector_factory(&impl); // auto impl = std::make_unique<MyServiceImpl>();
// TestConnectorFactory connector_factory(std::move(impl));
// std::unique_ptr<service_manager::Connector> connector = // std::unique_ptr<service_manager::Connector> connector =
// connector_factory.CreateConnector(); // connector_factory.CreateConnector();
// RunSomeClientCode(connector.get()); // RunSomeClientCode(connector.get());
...@@ -38,8 +39,7 @@ class Service; ...@@ -38,8 +39,7 @@ class Service;
class TestConnectorFactory { class TestConnectorFactory {
public: public:
// Constructs a new TestConnectorFactory which creates Connectors whose // Constructs a new TestConnectorFactory which creates Connectors whose
// requests are routed directly to |service|. |service| is not owned and must // requests are routed directly to |service|.
// outlive this TestConnectorFactory instance.
explicit TestConnectorFactory(std::unique_ptr<Service> service); explicit TestConnectorFactory(std::unique_ptr<Service> service);
~TestConnectorFactory(); ~TestConnectorFactory();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment