Class MockBareMetalSolutionConnection (2.13.0)

A class to mock BareMetalSolutionConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type BareMetalSolutionClient. To do so, construct an object of type BareMetalSolutionClient 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::baremetalsolution::v2::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::baremetalsolution::v2::ListInstancesRequest
Returns
Type Description
StreamRange< google::cloud::baremetalsolution::v2::Instance >

virtual GetInstance(google::cloud::baremetalsolution::v2::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::baremetalsolution::v2::GetInstanceRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::Instance >

virtual UpdateInstance(google::cloud::baremetalsolution::v2::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::baremetalsolution::v2::UpdateInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

virtual ResetInstance(google::cloud::baremetalsolution::v2::ResetInstanceRequest 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::baremetalsolution::v2::ResetInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::ResetInstanceResponse > >

virtual StartInstance(google::cloud::baremetalsolution::v2::StartInstanceRequest 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::baremetalsolution::v2::StartInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::StartInstanceResponse > >

virtual StopInstance(google::cloud::baremetalsolution::v2::StopInstanceRequest 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::baremetalsolution::v2::StopInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::StopInstanceResponse > >

virtual DetachLun(google::cloud::baremetalsolution::v2::DetachLunRequest 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::baremetalsolution::v2::DetachLunRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

virtual ListVolumes(google::cloud::baremetalsolution::v2::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::baremetalsolution::v2::ListVolumesRequest
Returns
Type Description
StreamRange< google::cloud::baremetalsolution::v2::Volume >

virtual GetVolume(google::cloud::baremetalsolution::v2::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::baremetalsolution::v2::GetVolumeRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::Volume >

virtual UpdateVolume(google::cloud::baremetalsolution::v2::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::baremetalsolution::v2::UpdateVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::Volume > >

virtual ResizeVolume(google::cloud::baremetalsolution::v2::ResizeVolumeRequest 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::baremetalsolution::v2::ResizeVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::Volume > >

virtual ListNetworks(google::cloud::baremetalsolution::v2::ListNetworksRequest)

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::baremetalsolution::v2::ListNetworksRequest
Returns
Type Description
StreamRange< google::cloud::baremetalsolution::v2::Network >

virtual ListNetworkUsage(google::cloud::baremetalsolution::v2::ListNetworkUsageRequest 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::baremetalsolution::v2::ListNetworkUsageRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::ListNetworkUsageResponse >

virtual GetNetwork(google::cloud::baremetalsolution::v2::GetNetworkRequest 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::baremetalsolution::v2::GetNetworkRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::Network >

virtual UpdateNetwork(google::cloud::baremetalsolution::v2::UpdateNetworkRequest 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::baremetalsolution::v2::UpdateNetworkRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::Network > >

virtual GetLun(google::cloud::baremetalsolution::v2::GetLunRequest 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::baremetalsolution::v2::GetLunRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::Lun >

virtual ListLuns(google::cloud::baremetalsolution::v2::ListLunsRequest)

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::baremetalsolution::v2::ListLunsRequest
Returns
Type Description
StreamRange< google::cloud::baremetalsolution::v2::Lun >

virtual GetNfsShare(google::cloud::baremetalsolution::v2::GetNfsShareRequest 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::baremetalsolution::v2::GetNfsShareRequest const &
Returns
Type Description
StatusOr< google::cloud::baremetalsolution::v2::NfsShare >

virtual ListNfsShares(google::cloud::baremetalsolution::v2::ListNfsSharesRequest)

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::baremetalsolution::v2::ListNfsSharesRequest
Returns
Type Description
StreamRange< google::cloud::baremetalsolution::v2::NfsShare >

virtual UpdateNfsShare(google::cloud::baremetalsolution::v2::UpdateNfsShareRequest 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::baremetalsolution::v2::UpdateNfsShareRequest const &
Returns
Type Description
future< StatusOr< google::cloud::baremetalsolution::v2::NfsShare > >