@@ -32,16 +32,16 @@ using ::testing::Return;
3232// / Shows how to mock simple APIs, including `DeleteObject` and `ComposeObject`.
3333TEST (StorageAsyncMockingSamples, MockDeleteObject) {
3434 namespace gc = ::google::cloud;
35- namespace gcs_ex = ::google::cloud::storage_experimental ;
35+ namespace gcs = ::google::cloud::storage ;
3636 auto mock =
3737 std::make_shared<google::cloud::storage_mocks::MockAsyncConnection>();
3838 EXPECT_CALL (*mock, options);
3939 EXPECT_CALL (*mock, DeleteObject)
4040 .WillOnce (Return (ByMove (gc::make_ready_future (gc::Status{}))));
4141
42- auto client = gcs_ex ::AsyncClient (mock);
42+ auto client = gcs ::AsyncClient (mock);
4343 auto actual =
44- client.DeleteObject (gcs_ex ::BucketName (" test-bucket" ), " test-object" )
44+ client.DeleteObject (gcs ::BucketName (" test-bucket" ), " test-object" )
4545 .get ();
4646 EXPECT_TRUE (actual.ok ());
4747}
@@ -51,13 +51,13 @@ TEST(StorageAsyncMockingSamples, MockDeleteObject) {
5151// / Shows how to mock more complex APIs, such as `ReadObject()`.
5252TEST (StorageAsyncMockingSamples, MockReadObject) {
5353 namespace gc = ::google::cloud;
54- namespace gcs_ex = ::google::cloud::storage_experimental ;
54+ namespace gcs = ::google::cloud::storage ;
5555 auto mock =
5656 std::make_shared<google::cloud::storage_mocks::MockAsyncConnection>();
5757 EXPECT_CALL (*mock, options);
5858 EXPECT_CALL (*mock, ReadObject).WillOnce ([] {
59- using ReadResponse = gcs_ex ::AsyncReaderConnection::ReadResponse;
60- using ReadPayload = gcs_ex ::ReadPayload;
59+ using ReadResponse = gcs ::AsyncReaderConnection::ReadResponse;
60+ using ReadPayload = gcs ::ReadPayload;
6161 auto reader = std::make_unique<
6262 google::cloud::storage_mocks::MockAsyncReaderConnection>();
6363 EXPECT_CALL (*reader, Read)
@@ -74,22 +74,22 @@ TEST(StorageAsyncMockingSamples, MockReadObject) {
7474 return gc::make_ready_future (ReadResponse (gc::Status{}));
7575 });
7676 return gc::make_ready_future (gc::make_status_or (
77- std::unique_ptr<gcs_ex ::AsyncReaderConnection>(std::move (reader))));
77+ std::unique_ptr<gcs ::AsyncReaderConnection>(std::move (reader))));
7878 });
7979
80- auto client = gcs_ex ::AsyncClient (mock);
80+ auto client = gcs ::AsyncClient (mock);
8181 // To simplify the test we use .get() to "block" until the gc::future is
8282 // ready, and then use `.value()` to get the `StatusOr<>` values or an
8383 // exception.
84- gcs_ex ::AsyncReader reader;
85- gcs_ex ::AsyncToken token;
84+ gcs ::AsyncReader reader;
85+ gcs ::AsyncToken token;
8686 std::tie (reader, token) =
87- client.ReadObject (gcs_ex ::BucketName (" test-bucket" ), " test-object" )
87+ client.ReadObject (gcs ::BucketName (" test-bucket" ), " test-object" )
8888 .get ()
8989 .value ();
9090
91- gcs_ex ::ReadPayload payload;
92- gcs_ex ::AsyncToken t; // Avoid use-after-move warnings from clang-tidy.
91+ gcs ::ReadPayload payload;
92+ gcs ::AsyncToken t; // Avoid use-after-move warnings from clang-tidy.
9393 std::tie (payload, t) = reader.Read (std::move (token)).get ().value ();
9494 token = std::move (t);
9595 EXPECT_THAT (payload.contents (), ElementsAre (" test-contents" ));
0 commit comments