Class MockTagValuesConnection (2.23.0-rc)

A class to mock TagValuesConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type TagValuesClient. To do so, construct an object of type TagValuesClient 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 ListTagValues(google::cloud::resourcemanager::v3::ListTagValuesRequest)

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::resourcemanager::v3::ListTagValuesRequest
Returns
TypeDescription
StreamRange< google::cloud::resourcemanager::v3::TagValue >

virtual GetTagValue(google::cloud::resourcemanager::v3::GetTagValueRequest 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::resourcemanager::v3::GetTagValueRequest const &
Returns
TypeDescription
StatusOr< google::cloud::resourcemanager::v3::TagValue >

virtual GetNamespacedTagValue(google::cloud::resourcemanager::v3::GetNamespacedTagValueRequest 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::resourcemanager::v3::GetNamespacedTagValueRequest const &
Returns
TypeDescription
StatusOr< google::cloud::resourcemanager::v3::TagValue >

virtual CreateTagValue(google::cloud::resourcemanager::v3::CreateTagValueRequest 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::resourcemanager::v3::CreateTagValueRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::resourcemanager::v3::TagValue > >

virtual UpdateTagValue(google::cloud::resourcemanager::v3::UpdateTagValueRequest 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::resourcemanager::v3::UpdateTagValueRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::resourcemanager::v3::TagValue > >

virtual DeleteTagValue(google::cloud::resourcemanager::v3::DeleteTagValueRequest 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::resourcemanager::v3::DeleteTagValueRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::resourcemanager::v3::TagValue > >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest 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::iam::v1::GetIamPolicyRequest const &
Returns
TypeDescription
StatusOr< google::iam::v1::Policy >

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest 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::iam::v1::SetIamPolicyRequest const &
Returns
TypeDescription
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest 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::iam::v1::TestIamPermissionsRequest const &
Returns
TypeDescription
StatusOr< google::iam::v1::TestIamPermissionsResponse >