Class MockPacketMirroringsConnection (2.20.0)

A class to mock PacketMirroringsConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type PacketMirroringsClient. To do so, construct an object of type PacketMirroringsClient 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 AggregatedListPacketMirrorings(google::cloud::cpp::compute::packet_mirrorings::v1::AggregatedListPacketMirroringsRequest)

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::cpp::compute::packet_mirrorings::v1::AggregatedListPacketMirroringsRequest
Returns
Type Description
StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::PacketMirroringsScopedList > >

virtual DeletePacketMirroring(google::cloud::cpp::compute::packet_mirrorings::v1::DeletePacketMirroringRequest 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::cpp::compute::packet_mirrorings::v1::DeletePacketMirroringRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual GetPacketMirroring(google::cloud::cpp::compute::packet_mirrorings::v1::GetPacketMirroringRequest 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::cpp::compute::packet_mirrorings::v1::GetPacketMirroringRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::PacketMirroring >

virtual InsertPacketMirroring(google::cloud::cpp::compute::packet_mirrorings::v1::InsertPacketMirroringRequest 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::cpp::compute::packet_mirrorings::v1::InsertPacketMirroringRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual ListPacketMirrorings(google::cloud::cpp::compute::packet_mirrorings::v1::ListPacketMirroringsRequest)

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::cpp::compute::packet_mirrorings::v1::ListPacketMirroringsRequest
Returns
Type Description
StreamRange< google::cloud::cpp::compute::v1::PacketMirroring >

virtual PatchPacketMirroring(google::cloud::cpp::compute::packet_mirrorings::v1::PatchPacketMirroringRequest 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::cpp::compute::packet_mirrorings::v1::PatchPacketMirroringRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual TestIamPermissions(google::cloud::cpp::compute::packet_mirrorings::v1::TestIamPermissionsRequest 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::cpp::compute::packet_mirrorings::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >