Class MockCertificateAuthorityServiceConnection (2.16.0)

A class to mock CertificateAuthorityServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type CertificateAuthorityServiceClient. To do so, construct an object of type CertificateAuthorityServiceClient 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 CreateCertificate(google::cloud::security::privateca::v1::CreateCertificateRequest 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::security::privateca::v1::CreateCertificateRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::Certificate >

virtual GetCertificate(google::cloud::security::privateca::v1::GetCertificateRequest 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::security::privateca::v1::GetCertificateRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::Certificate >

virtual ListCertificates(google::cloud::security::privateca::v1::ListCertificatesRequest)

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::security::privateca::v1::ListCertificatesRequest
Returns
Type Description
StreamRange< google::cloud::security::privateca::v1::Certificate >

virtual RevokeCertificate(google::cloud::security::privateca::v1::RevokeCertificateRequest 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::security::privateca::v1::RevokeCertificateRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::Certificate >

virtual UpdateCertificate(google::cloud::security::privateca::v1::UpdateCertificateRequest 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::security::privateca::v1::UpdateCertificateRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::Certificate >

virtual ActivateCertificateAuthority(google::cloud::security::privateca::v1::ActivateCertificateAuthorityRequest 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::security::privateca::v1::ActivateCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual CreateCertificateAuthority(google::cloud::security::privateca::v1::CreateCertificateAuthorityRequest 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::security::privateca::v1::CreateCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual DisableCertificateAuthority(google::cloud::security::privateca::v1::DisableCertificateAuthorityRequest 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::security::privateca::v1::DisableCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual EnableCertificateAuthority(google::cloud::security::privateca::v1::EnableCertificateAuthorityRequest 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::security::privateca::v1::EnableCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual FetchCertificateAuthorityCsr(google::cloud::security::privateca::v1::FetchCertificateAuthorityCsrRequest 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::security::privateca::v1::FetchCertificateAuthorityCsrRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::FetchCertificateAuthorityCsrResponse >

virtual GetCertificateAuthority(google::cloud::security::privateca::v1::GetCertificateAuthorityRequest 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::security::privateca::v1::GetCertificateAuthorityRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::CertificateAuthority >

virtual ListCertificateAuthorities(google::cloud::security::privateca::v1::ListCertificateAuthoritiesRequest)

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::security::privateca::v1::ListCertificateAuthoritiesRequest
Returns
Type Description
StreamRange< google::cloud::security::privateca::v1::CertificateAuthority >

virtual UndeleteCertificateAuthority(google::cloud::security::privateca::v1::UndeleteCertificateAuthorityRequest 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::security::privateca::v1::UndeleteCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual DeleteCertificateAuthority(google::cloud::security::privateca::v1::DeleteCertificateAuthorityRequest 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::security::privateca::v1::DeleteCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual UpdateCertificateAuthority(google::cloud::security::privateca::v1::UpdateCertificateAuthorityRequest 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::security::privateca::v1::UpdateCertificateAuthorityRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateAuthority > >

virtual CreateCaPool(google::cloud::security::privateca::v1::CreateCaPoolRequest 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::security::privateca::v1::CreateCaPoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CaPool > >

virtual UpdateCaPool(google::cloud::security::privateca::v1::UpdateCaPoolRequest 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::security::privateca::v1::UpdateCaPoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CaPool > >

virtual GetCaPool(google::cloud::security::privateca::v1::GetCaPoolRequest 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::security::privateca::v1::GetCaPoolRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::CaPool >

virtual ListCaPools(google::cloud::security::privateca::v1::ListCaPoolsRequest)

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::security::privateca::v1::ListCaPoolsRequest
Returns
Type Description
StreamRange< google::cloud::security::privateca::v1::CaPool >

virtual DeleteCaPool(google::cloud::security::privateca::v1::DeleteCaPoolRequest 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::security::privateca::v1::DeleteCaPoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::OperationMetadata > >

virtual FetchCaCerts(google::cloud::security::privateca::v1::FetchCaCertsRequest 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::security::privateca::v1::FetchCaCertsRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::FetchCaCertsResponse >

virtual GetCertificateRevocationList(google::cloud::security::privateca::v1::GetCertificateRevocationListRequest 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::security::privateca::v1::GetCertificateRevocationListRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::CertificateRevocationList >

virtual ListCertificateRevocationLists(google::cloud::security::privateca::v1::ListCertificateRevocationListsRequest)

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::security::privateca::v1::ListCertificateRevocationListsRequest
Returns
Type Description
StreamRange< google::cloud::security::privateca::v1::CertificateRevocationList >

virtual UpdateCertificateRevocationList(google::cloud::security::privateca::v1::UpdateCertificateRevocationListRequest 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::security::privateca::v1::UpdateCertificateRevocationListRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateRevocationList > >

virtual CreateCertificateTemplate(google::cloud::security::privateca::v1::CreateCertificateTemplateRequest 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::security::privateca::v1::CreateCertificateTemplateRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateTemplate > >

virtual DeleteCertificateTemplate(google::cloud::security::privateca::v1::DeleteCertificateTemplateRequest 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::security::privateca::v1::DeleteCertificateTemplateRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::OperationMetadata > >

virtual GetCertificateTemplate(google::cloud::security::privateca::v1::GetCertificateTemplateRequest 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::security::privateca::v1::GetCertificateTemplateRequest const &
Returns
Type Description
StatusOr< google::cloud::security::privateca::v1::CertificateTemplate >

virtual ListCertificateTemplates(google::cloud::security::privateca::v1::ListCertificateTemplatesRequest)

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::security::privateca::v1::ListCertificateTemplatesRequest
Returns
Type Description
StreamRange< google::cloud::security::privateca::v1::CertificateTemplate >

virtual UpdateCertificateTemplate(google::cloud::security::privateca::v1::UpdateCertificateTemplateRequest 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::security::privateca::v1::UpdateCertificateTemplateRequest const &
Returns
Type Description
future< StatusOr< google::cloud::security::privateca::v1::CertificateTemplate > >