summaryrefslogtreecommitdiffstats
path: root/googlemock/g3doc/includes/g3_mock_a_stubby_server.md
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-01-05 16:46:37 -0500
committerDerek Mauro <dmauro@google.com>2021-01-13 20:59:12 -0500
commit489283524e3726b7adb9692763c2fb61b235d41a (patch)
tree0c21fdc64b8978bcac9cee62f14584ce4f024bc9 /googlemock/g3doc/includes/g3_mock_a_stubby_server.md
parent996b65e64e415c683d7f15ee5926d66309425ce8 (diff)
downloadgoogletest-489283524e3726b7adb9692763c2fb61b235d41a.tar.gz
googletest-489283524e3726b7adb9692763c2fb61b235d41a.zip
Googletest export
Move all docs into top-level docs/ directory PiperOrigin-RevId: 350211277
Diffstat (limited to 'googlemock/g3doc/includes/g3_mock_a_stubby_server.md')
-rw-r--r--googlemock/g3doc/includes/g3_mock_a_stubby_server.md37
1 files changed, 0 insertions, 37 deletions
diff --git a/googlemock/g3doc/includes/g3_mock_a_stubby_server.md b/googlemock/g3doc/includes/g3_mock_a_stubby_server.md
deleted file mode 100644
index 749f6248..00000000
--- a/googlemock/g3doc/includes/g3_mock_a_stubby_server.md
+++ /dev/null
@@ -1,37 +0,0 @@
-### I need to mock a Stubby server. Should I use gMock or the service mocker? {#GMockVsServiceMocker}
-
-To quote PiotrKaminski, the author of the service mocker:
-
-You can find an introduction to the service mocker
-[here](http://go/stubby-codelab#test-client), and detailed documentation in
-net/rpc/testing/public/servicemocker.h. As I'm the author of the framework my
-opinion on it can hardly be objective, but here are the main advantages it has
-over gMock when it comes to mocking Stubby services:
-
-* Services are mocked dynamically so there's no need to manually write mock
- service implementations.
-* The client's calls go through a real Stubby channel, which will catch some
- errors that calling a service implementation directly would miss.
-* The service mocker is aware of sync/async client distinctions and common
- Stubby threading strategies, and in general allows you to exert more control
- over when the callback is made.
-* The base syntax and semantics are very similar to gMock, but Stubby-specific
- matchers and actions make the testing code more compact.
-* A powerful expectation grouping mechanism allows expressing complicated
- async call ordering constraints in a readable fashion.
-* By the end of the week, there'll be built-in support for testing call
- cancellation.
-
-Some disadvantages:
-
-* The service mocker documentation is not as good as gMock's.
-* The error messages are probably not as good as gMock's either.
-* You can only mock services, not arbitrary classes. Expectations do not
- interact with gMock's.
-* Slightly different expectation matching semantics in corner cases, which
- could get confusing if you're using gMock as well.
-
-In my biased opinion, if you only need to mock out Stubby services, you should
-look at the service mocker first. If you need to mock out other classes too, and
-especially if you need to express relationships between service and other
-expectations, you're probably better off with gMock.
OpenPOWER on IntegriCloud