diff options
author | 2016-01-13 22:43:20 -0800 | |
---|---|---|
committer | 2016-01-13 22:43:20 -0800 | |
commit | 5a05f51a1c7de7f17bef1ce904afba67426992bb (patch) | |
tree | 2fe56c74dc5c15055a05b5ca3c83946d29f4daa3 /test/cpp/end2end/mock_test.cc | |
parent | 16a7dee6141785092ee2aae4a11d2e9f590a1847 (diff) |
Rename TestService to EchoTestService to prevent name-conflict with
'TestService' in test.proto
Diffstat (limited to 'test/cpp/end2end/mock_test.cc')
-rw-r--r-- | test/cpp/end2end/mock_test.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index dddd1d0a2e..36ff6835d7 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -51,7 +51,7 @@ using grpc::testing::EchoRequest; using grpc::testing::EchoResponse; -using grpc::testing::TestService; +using grpc::testing::EchoTestService; using std::chrono::system_clock; namespace grpc { @@ -98,7 +98,7 @@ class MockClientReaderWriter<EchoRequest, EchoResponse> GRPC_FINAL }; // Mocked stub. -class MockStub : public TestService::StubInterface { +class MockStub : public EchoTestService::StubInterface { public: MockStub() {} ~MockStub() {} @@ -154,7 +154,7 @@ class MockStub : public TestService::StubInterface { class FakeClient { public: - explicit FakeClient(TestService::StubInterface* stub) : stub_(stub) {} + explicit FakeClient(EchoTestService::StubInterface* stub) : stub_(stub) {} void DoEcho() { ClientContext context; @@ -197,13 +197,13 @@ class FakeClient { EXPECT_TRUE(s.ok()); } - void ResetStub(TestService::StubInterface* stub) { stub_ = stub; } + void ResetStub(EchoTestService::StubInterface* stub) { stub_ = stub; } private: - TestService::StubInterface* stub_; + EchoTestService::StubInterface* stub_; }; -class TestServiceImpl : public TestService::Service { +class TestServiceImpl : public EchoTestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -245,10 +245,10 @@ class MockTest : public ::testing::Test { void ResetStub() { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::testing::TestService::NewStub(channel); + stub_ = grpc::testing::EchoTestService::NewStub(channel); } - std::unique_ptr<grpc::testing::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_; std::unique_ptr<Server> server_; std::ostringstream server_address_; TestServiceImpl service_; |