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::cloud::netapp::v1::CreateStoragePoolRequest 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::CreateStoragePoolRequest 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::cloud::netapp::v1::UpdateStoragePoolRequest 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::UpdateStoragePoolRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::StoragePool > > |
|
virtual DeleteStoragePool(google::cloud::netapp::v1::DeleteStoragePoolRequest 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::DeleteStoragePoolRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
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::cloud::netapp::v1::CreateVolumeRequest 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::CreateVolumeRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Volume > > |
|
virtual UpdateVolume(google::cloud::netapp::v1::UpdateVolumeRequest 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::UpdateVolumeRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Volume > > |
|
virtual DeleteVolume(google::cloud::netapp::v1::DeleteVolumeRequest 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::DeleteVolumeRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual RevertVolume(google::cloud::netapp::v1::RevertVolumeRequest 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::RevertVolumeRequest 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::cloud::netapp::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::netapp::v1::CreateSnapshotRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Snapshot > > |
|
virtual DeleteSnapshot(google::cloud::netapp::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::netapp::v1::DeleteSnapshotRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual UpdateSnapshot(google::cloud::netapp::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::netapp::v1::UpdateSnapshotRequest 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::cloud::netapp::v1::CreateActiveDirectoryRequest 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::CreateActiveDirectoryRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > > |
|
virtual UpdateActiveDirectory(google::cloud::netapp::v1::UpdateActiveDirectoryRequest 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::UpdateActiveDirectoryRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > > |
|
virtual DeleteActiveDirectory(google::cloud::netapp::v1::DeleteActiveDirectoryRequest 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::DeleteActiveDirectoryRequest 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::cloud::netapp::v1::CreateKmsConfigRequest 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::CreateKmsConfigRequest 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::cloud::netapp::v1::UpdateKmsConfigRequest 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::UpdateKmsConfigRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::KmsConfig > > |
|
virtual EncryptVolumes(google::cloud::netapp::v1::EncryptVolumesRequest 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::EncryptVolumesRequest 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::cloud::netapp::v1::DeleteKmsConfigRequest 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::DeleteKmsConfigRequest 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::cloud::netapp::v1::CreateReplicationRequest 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::CreateReplicationRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual DeleteReplication(google::cloud::netapp::v1::DeleteReplicationRequest 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::DeleteReplicationRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > > |
|
virtual UpdateReplication(google::cloud::netapp::v1::UpdateReplicationRequest 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::UpdateReplicationRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual StopReplication(google::cloud::netapp::v1::StopReplicationRequest 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::StopReplicationRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual ResumeReplication(google::cloud::netapp::v1::ResumeReplicationRequest 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::ResumeReplicationRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|
virtual ReverseReplicationDirection(google::cloud::netapp::v1::ReverseReplicationDirectionRequest 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::ReverseReplicationDirectionRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::netapp::v1::Replication > > |
|