Class MockFirewallConnection (2.20.0)

A class to mock FirewallConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type FirewallClient. To do so, construct an object of type FirewallClient 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 ListIngressRules(google::appengine::v1::ListIngressRulesRequest)

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::appengine::v1::ListIngressRulesRequest
Returns
Type Description
StreamRange< google::appengine::v1::FirewallRule >

virtual BatchUpdateIngressRules(google::appengine::v1::BatchUpdateIngressRulesRequest 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::appengine::v1::BatchUpdateIngressRulesRequest const &
Returns
Type Description
StatusOr< google::appengine::v1::BatchUpdateIngressRulesResponse >

virtual CreateIngressRule(google::appengine::v1::CreateIngressRuleRequest 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::appengine::v1::CreateIngressRuleRequest const &
Returns
Type Description
StatusOr< google::appengine::v1::FirewallRule >

virtual GetIngressRule(google::appengine::v1::GetIngressRuleRequest 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::appengine::v1::GetIngressRuleRequest const &
Returns
Type Description
StatusOr< google::appengine::v1::FirewallRule >

virtual UpdateIngressRule(google::appengine::v1::UpdateIngressRuleRequest 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::appengine::v1::UpdateIngressRuleRequest const &
Returns
Type Description
StatusOr< google::appengine::v1::FirewallRule >

virtual DeleteIngressRule(google::appengine::v1::DeleteIngressRuleRequest 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::appengine::v1::DeleteIngressRuleRequest const &
Returns
Type Description
Status