Class MockCloudFilestoreManagerConnection (2.22.0-rc)

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
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::ListInstancesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::GetInstanceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::CreateInstanceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::UpdateInstanceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::RestoreInstanceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::filestore::v1::Instance > >

virtual RevertInstance(google::cloud::filestore::v1::RevertInstanceRequest const &)

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

Parameter
NameDescription
request google::cloud::filestore::v1::RevertInstanceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::DeleteInstanceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::ListSnapshotsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::GetSnapshotRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::CreateSnapshotRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::DeleteSnapshotRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::UpdateSnapshotRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::ListBackupsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::GetBackupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::CreateBackupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::DeleteBackupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::filestore::v1::UpdateBackupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::filestore::v1::Backup > >