A class to mock NetAppConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type NetAppClient
. To do so, construct an object of type NetAppClient
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 ListStoragePools(google::cloud::netapp::v1::ListStoragePoolsRequest)
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::netapp::v1::ListStoragePoolsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::StoragePool > |
|
virtual CreateStoragePool(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::StoragePool > > |
|
virtual GetStoragePool(google::cloud::netapp::v1::GetStoragePoolRequest 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::netapp::v1::GetStoragePoolRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::StoragePool > |
|
virtual UpdateStoragePool(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::StoragePool > > |
|
virtual DeleteStoragePool(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual SwitchActiveReplicaZone(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::StoragePool > > |
|
virtual ListVolumes(google::cloud::netapp::v1::ListVolumesRequest)
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::netapp::v1::ListVolumesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::Volume > |
|
virtual GetVolume(google::cloud::netapp::v1::GetVolumeRequest 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::netapp::v1::GetVolumeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::Volume > |
|
virtual CreateVolume(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Volume > > |
|
virtual UpdateVolume(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Volume > > |
|
virtual DeleteVolume(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual RevertVolume(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Volume > > |
|
virtual ListSnapshots(google::cloud::netapp::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::netapp::v1::ListSnapshotsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::Snapshot > |
|
virtual GetSnapshot(google::cloud::netapp::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::netapp::v1::GetSnapshotRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::Snapshot > |
|
virtual CreateSnapshot(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Snapshot > > |
|
virtual DeleteSnapshot(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual UpdateSnapshot(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Snapshot > > |
|
virtual ListActiveDirectories(google::cloud::netapp::v1::ListActiveDirectoriesRequest)
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::netapp::v1::ListActiveDirectoriesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::ActiveDirectory > |
|
virtual GetActiveDirectory(google::cloud::netapp::v1::GetActiveDirectoryRequest 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::netapp::v1::GetActiveDirectoryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::ActiveDirectory > |
|
virtual CreateActiveDirectory(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > > |
|
virtual UpdateActiveDirectory(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > > |
|
virtual DeleteActiveDirectory(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual ListKmsConfigs(google::cloud::netapp::v1::ListKmsConfigsRequest)
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::netapp::v1::ListKmsConfigsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::KmsConfig > |
|
virtual CreateKmsConfig(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::KmsConfig > > |
|
virtual GetKmsConfig(google::cloud::netapp::v1::GetKmsConfigRequest 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::netapp::v1::GetKmsConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::KmsConfig > |
|
virtual UpdateKmsConfig(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::KmsConfig > > |
|
virtual EncryptVolumes(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::KmsConfig > > |
|
virtual VerifyKmsConfig(google::cloud::netapp::v1::VerifyKmsConfigRequest 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::netapp::v1::VerifyKmsConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::VerifyKmsConfigResponse > |
|
virtual DeleteKmsConfig(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual ListReplications(google::cloud::netapp::v1::ListReplicationsRequest)
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::netapp::v1::ListReplicationsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::Replication > |
|
virtual GetReplication(google::cloud::netapp::v1::GetReplicationRequest 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::netapp::v1::GetReplicationRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::Replication > |
|
virtual CreateReplication(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual DeleteReplication(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual UpdateReplication(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual StopReplication(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual ResumeReplication(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual ReverseReplicationDirection(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual CreateBackupVault(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::BackupVault > > |
|
virtual GetBackupVault(google::cloud::netapp::v1::GetBackupVaultRequest 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::netapp::v1::GetBackupVaultRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::BackupVault > |
|
virtual ListBackupVaults(google::cloud::netapp::v1::ListBackupVaultsRequest)
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::netapp::v1::ListBackupVaultsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::BackupVault > |
|
virtual UpdateBackupVault(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::BackupVault > > |
|
virtual DeleteBackupVault(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual CreateBackup(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Backup > > |
|
virtual GetBackup(google::cloud::netapp::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::netapp::v1::GetBackupRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::Backup > |
|
virtual ListBackups(google::cloud::netapp::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::netapp::v1::ListBackupsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::Backup > |
|
virtual DeleteBackup(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual UpdateBackup(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Backup > > |
|
virtual CreateBackupPolicy(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::BackupPolicy > > |
|
virtual GetBackupPolicy(google::cloud::netapp::v1::GetBackupPolicyRequest 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::netapp::v1::GetBackupPolicyRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::netapp::v1::BackupPolicy > |
|
virtual ListBackupPolicies(google::cloud::netapp::v1::ListBackupPoliciesRequest)
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::netapp::v1::ListBackupPoliciesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::netapp::v1::BackupPolicy > |
|
virtual UpdateBackupPolicy(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::BackupPolicy > > |
|
virtual DeleteBackupPolicy(google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter |
Name |
Description |
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual ListLocations(google::cloud::location::ListLocationsRequest)
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::location::ListLocationsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::location::Location > |
|
virtual GetLocation(google::cloud::location::GetLocationRequest 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::location::GetLocationRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::location::Location > |
|
virtual ListOperations(google::longrunning::ListOperationsRequest)
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::longrunning::ListOperationsRequest
|
Returns |
Type |
Description |
StreamRange< google::longrunning::Operation > |
|
virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
|
Returns |
Type |
Description |
StatusOr< google::longrunning::Operation > |
|
virtual DeleteOperation(google::longrunning::DeleteOperationRequest 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::longrunning::DeleteOperationRequest const &
|
Returns |
Type |
Description |
Status |
|
virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
|
Returns |
Type |
Description |
Status |
|