Class MockCloudFilestoreManagerConnection (2.12.0)

A class to mock CloudFilestoreManagerConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type CloudFilestoreManagerClient. To do so, construct an object of type CloudFilestoreManagerClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See Also

This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
Type Description
Options

virtual ListInstances(google::cloud::filestore::v1::ListInstancesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::ListInstancesRequest
Returns
Type Description
StreamRange< google::cloud::filestore::v1::Instance >

virtual GetInstance(google::cloud::filestore::v1::GetInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::GetInstanceRequest const &
Returns
Type Description
StatusOr< google::cloud::filestore::v1::Instance >

virtual CreateInstance(google::cloud::filestore::v1::CreateInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::CreateInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Instance > >

virtual UpdateInstance(google::cloud::filestore::v1::UpdateInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::UpdateInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Instance > >

virtual RestoreInstance(google::cloud::filestore::v1::RestoreInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::RestoreInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Instance > >

virtual DeleteInstance(google::cloud::filestore::v1::DeleteInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::DeleteInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::common::OperationMetadata > >

virtual ListSnapshots(google::cloud::filestore::v1::ListSnapshotsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::ListSnapshotsRequest
Returns
Type Description
StreamRange< google::cloud::filestore::v1::Snapshot >

virtual GetSnapshot(google::cloud::filestore::v1::GetSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::GetSnapshotRequest const &
Returns
Type Description
StatusOr< google::cloud::filestore::v1::Snapshot >

virtual CreateSnapshot(google::cloud::filestore::v1::CreateSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::CreateSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Snapshot > >

virtual DeleteSnapshot(google::cloud::filestore::v1::DeleteSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::DeleteSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::common::OperationMetadata > >

virtual UpdateSnapshot(google::cloud::filestore::v1::UpdateSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::UpdateSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Snapshot > >

virtual ListBackups(google::cloud::filestore::v1::ListBackupsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::ListBackupsRequest
Returns
Type Description
StreamRange< google::cloud::filestore::v1::Backup >

virtual GetBackup(google::cloud::filestore::v1::GetBackupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::GetBackupRequest const &
Returns
Type Description
StatusOr< google::cloud::filestore::v1::Backup >

virtual CreateBackup(google::cloud::filestore::v1::CreateBackupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::CreateBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Backup > >

virtual DeleteBackup(google::cloud::filestore::v1::DeleteBackupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::DeleteBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::common::OperationMetadata > >

virtual UpdateBackup(google::cloud::filestore::v1::UpdateBackupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::filestore::v1::UpdateBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::filestore::v1::Backup > >