Class MockNetworkSecurityConnection (2.15.1)

A class to mock NetworkSecurityConnection.

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

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::networksecurity::v1::ListAuthorizationPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::networksecurity::v1::AuthorizationPolicy >

virtual GetAuthorizationPolicy(google::cloud::networksecurity::v1::GetAuthorizationPolicyRequest 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::networksecurity::v1::GetAuthorizationPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::networksecurity::v1::AuthorizationPolicy >

virtual CreateAuthorizationPolicy(google::cloud::networksecurity::v1::CreateAuthorizationPolicyRequest 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::networksecurity::v1::CreateAuthorizationPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::AuthorizationPolicy > >

virtual UpdateAuthorizationPolicy(google::cloud::networksecurity::v1::UpdateAuthorizationPolicyRequest 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::networksecurity::v1::UpdateAuthorizationPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::AuthorizationPolicy > >

virtual DeleteAuthorizationPolicy(google::cloud::networksecurity::v1::DeleteAuthorizationPolicyRequest 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::networksecurity::v1::DeleteAuthorizationPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::OperationMetadata > >

virtual ListServerTlsPolicies(google::cloud::networksecurity::v1::ListServerTlsPoliciesRequest)

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::networksecurity::v1::ListServerTlsPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::networksecurity::v1::ServerTlsPolicy >

virtual GetServerTlsPolicy(google::cloud::networksecurity::v1::GetServerTlsPolicyRequest 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::networksecurity::v1::GetServerTlsPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::networksecurity::v1::ServerTlsPolicy >

virtual CreateServerTlsPolicy(google::cloud::networksecurity::v1::CreateServerTlsPolicyRequest 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::networksecurity::v1::CreateServerTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::ServerTlsPolicy > >

virtual UpdateServerTlsPolicy(google::cloud::networksecurity::v1::UpdateServerTlsPolicyRequest 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::networksecurity::v1::UpdateServerTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::ServerTlsPolicy > >

virtual DeleteServerTlsPolicy(google::cloud::networksecurity::v1::DeleteServerTlsPolicyRequest 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::networksecurity::v1::DeleteServerTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::OperationMetadata > >

virtual ListClientTlsPolicies(google::cloud::networksecurity::v1::ListClientTlsPoliciesRequest)

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::networksecurity::v1::ListClientTlsPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::networksecurity::v1::ClientTlsPolicy >

virtual GetClientTlsPolicy(google::cloud::networksecurity::v1::GetClientTlsPolicyRequest 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::networksecurity::v1::GetClientTlsPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::networksecurity::v1::ClientTlsPolicy >

virtual CreateClientTlsPolicy(google::cloud::networksecurity::v1::CreateClientTlsPolicyRequest 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::networksecurity::v1::CreateClientTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::ClientTlsPolicy > >

virtual UpdateClientTlsPolicy(google::cloud::networksecurity::v1::UpdateClientTlsPolicyRequest 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::networksecurity::v1::UpdateClientTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::ClientTlsPolicy > >

virtual DeleteClientTlsPolicy(google::cloud::networksecurity::v1::DeleteClientTlsPolicyRequest 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::networksecurity::v1::DeleteClientTlsPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networksecurity::v1::OperationMetadata > >