Class MockCloudChannelServiceConnection (2.22.0)

A class to mock CloudChannelServiceConnection.

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

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::channel::v1::ListCustomersRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::Customer >

virtual GetCustomer(google::cloud::channel::v1::GetCustomerRequest 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::channel::v1::GetCustomerRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Customer >

virtual CheckCloudIdentityAccountsExist(google::cloud::channel::v1::CheckCloudIdentityAccountsExistRequest 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::channel::v1::CheckCloudIdentityAccountsExistRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::CheckCloudIdentityAccountsExistResponse >

virtual CreateCustomer(google::cloud::channel::v1::CreateCustomerRequest 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::channel::v1::CreateCustomerRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Customer >

virtual UpdateCustomer(google::cloud::channel::v1::UpdateCustomerRequest 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::channel::v1::UpdateCustomerRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Customer >

virtual DeleteCustomer(google::cloud::channel::v1::DeleteCustomerRequest 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::channel::v1::DeleteCustomerRequest const &
Returns
TypeDescription
Status

virtual ImportCustomer(google::cloud::channel::v1::ImportCustomerRequest 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::channel::v1::ImportCustomerRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Customer >

virtual ProvisionCloudIdentity(google::cloud::channel::v1::ProvisionCloudIdentityRequest 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::channel::v1::ProvisionCloudIdentityRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Customer > >

virtual ListEntitlements(google::cloud::channel::v1::ListEntitlementsRequest)

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::channel::v1::ListEntitlementsRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::Entitlement >

virtual ListTransferableSkus(google::cloud::channel::v1::ListTransferableSkusRequest)

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::channel::v1::ListTransferableSkusRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::TransferableSku >

virtual ListTransferableOffers(google::cloud::channel::v1::ListTransferableOffersRequest)

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::channel::v1::ListTransferableOffersRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::TransferableOffer >

virtual GetEntitlement(google::cloud::channel::v1::GetEntitlementRequest 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::channel::v1::GetEntitlementRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Entitlement >

virtual CreateEntitlement(google::cloud::channel::v1::CreateEntitlementRequest 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::channel::v1::CreateEntitlementRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual ChangeParameters(google::cloud::channel::v1::ChangeParametersRequest 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::channel::v1::ChangeParametersRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual ChangeRenewalSettings(google::cloud::channel::v1::ChangeRenewalSettingsRequest 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::channel::v1::ChangeRenewalSettingsRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual ChangeOffer(google::cloud::channel::v1::ChangeOfferRequest 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::channel::v1::ChangeOfferRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual StartPaidService(google::cloud::channel::v1::StartPaidServiceRequest 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::channel::v1::StartPaidServiceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual SuspendEntitlement(google::cloud::channel::v1::SuspendEntitlementRequest 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::channel::v1::SuspendEntitlementRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual CancelEntitlement(google::cloud::channel::v1::CancelEntitlementRequest 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::channel::v1::CancelEntitlementRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::OperationMetadata > >

virtual ActivateEntitlement(google::cloud::channel::v1::ActivateEntitlementRequest 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::channel::v1::ActivateEntitlementRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::Entitlement > >

virtual TransferEntitlements(google::cloud::channel::v1::TransferEntitlementsRequest 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::channel::v1::TransferEntitlementsRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::TransferEntitlementsResponse > >

virtual TransferEntitlementsToGoogle(google::cloud::channel::v1::TransferEntitlementsToGoogleRequest 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::channel::v1::TransferEntitlementsToGoogleRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::channel::v1::OperationMetadata > >

virtual ListChannelPartnerLinks(google::cloud::channel::v1::ListChannelPartnerLinksRequest)

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::channel::v1::ListChannelPartnerLinksRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::ChannelPartnerLink >

virtual GetChannelPartnerLink(google::cloud::channel::v1::GetChannelPartnerLinkRequest 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::channel::v1::GetChannelPartnerLinkRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerLink >

virtual CreateChannelPartnerLink(google::cloud::channel::v1::CreateChannelPartnerLinkRequest 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::channel::v1::CreateChannelPartnerLinkRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerLink >

virtual UpdateChannelPartnerLink(google::cloud::channel::v1::UpdateChannelPartnerLinkRequest 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::channel::v1::UpdateChannelPartnerLinkRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerLink >

virtual GetCustomerRepricingConfig(google::cloud::channel::v1::GetCustomerRepricingConfigRequest 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::channel::v1::GetCustomerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::CustomerRepricingConfig >

virtual ListCustomerRepricingConfigs(google::cloud::channel::v1::ListCustomerRepricingConfigsRequest)

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::channel::v1::ListCustomerRepricingConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::CustomerRepricingConfig >

virtual CreateCustomerRepricingConfig(google::cloud::channel::v1::CreateCustomerRepricingConfigRequest 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::channel::v1::CreateCustomerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::CustomerRepricingConfig >

virtual UpdateCustomerRepricingConfig(google::cloud::channel::v1::UpdateCustomerRepricingConfigRequest 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::channel::v1::UpdateCustomerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::CustomerRepricingConfig >

virtual DeleteCustomerRepricingConfig(google::cloud::channel::v1::DeleteCustomerRepricingConfigRequest 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::channel::v1::DeleteCustomerRepricingConfigRequest const &
Returns
TypeDescription
Status

virtual GetChannelPartnerRepricingConfig(google::cloud::channel::v1::GetChannelPartnerRepricingConfigRequest 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::channel::v1::GetChannelPartnerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerRepricingConfig >

virtual ListChannelPartnerRepricingConfigs(google::cloud::channel::v1::ListChannelPartnerRepricingConfigsRequest)

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::channel::v1::ListChannelPartnerRepricingConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::ChannelPartnerRepricingConfig >

virtual CreateChannelPartnerRepricingConfig(google::cloud::channel::v1::CreateChannelPartnerRepricingConfigRequest 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::channel::v1::CreateChannelPartnerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerRepricingConfig >

virtual UpdateChannelPartnerRepricingConfig(google::cloud::channel::v1::UpdateChannelPartnerRepricingConfigRequest 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::channel::v1::UpdateChannelPartnerRepricingConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::ChannelPartnerRepricingConfig >

virtual DeleteChannelPartnerRepricingConfig(google::cloud::channel::v1::DeleteChannelPartnerRepricingConfigRequest 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::channel::v1::DeleteChannelPartnerRepricingConfigRequest const &
Returns
TypeDescription
Status

virtual ListSkuGroups(google::cloud::channel::v1::ListSkuGroupsRequest)

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::channel::v1::ListSkuGroupsRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::SkuGroup >

virtual ListSkuGroupBillableSkus(google::cloud::channel::v1::ListSkuGroupBillableSkusRequest)

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::channel::v1::ListSkuGroupBillableSkusRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::BillableSku >

virtual LookupOffer(google::cloud::channel::v1::LookupOfferRequest 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::channel::v1::LookupOfferRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::Offer >

virtual ListProducts(google::cloud::channel::v1::ListProductsRequest)

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::channel::v1::ListProductsRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::Product >

virtual ListSkus(google::cloud::channel::v1::ListSkusRequest)

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::channel::v1::ListSkusRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::Sku >

virtual ListOffers(google::cloud::channel::v1::ListOffersRequest)

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::channel::v1::ListOffersRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::Offer >

virtual ListPurchasableSkus(google::cloud::channel::v1::ListPurchasableSkusRequest)

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::channel::v1::ListPurchasableSkusRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::PurchasableSku >

virtual ListPurchasableOffers(google::cloud::channel::v1::ListPurchasableOffersRequest)

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::channel::v1::ListPurchasableOffersRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::PurchasableOffer >

virtual QueryEligibleBillingAccounts(google::cloud::channel::v1::QueryEligibleBillingAccountsRequest 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::channel::v1::QueryEligibleBillingAccountsRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::QueryEligibleBillingAccountsResponse >

virtual RegisterSubscriber(google::cloud::channel::v1::RegisterSubscriberRequest 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::channel::v1::RegisterSubscriberRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::RegisterSubscriberResponse >

virtual UnregisterSubscriber(google::cloud::channel::v1::UnregisterSubscriberRequest 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::channel::v1::UnregisterSubscriberRequest const &
Returns
TypeDescription
StatusOr< google::cloud::channel::v1::UnregisterSubscriberResponse >

virtual ListSubscribers(google::cloud::channel::v1::ListSubscribersRequest)

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::channel::v1::ListSubscribersRequest
Returns
TypeDescription
StreamRange< std::string >

virtual ListEntitlementChanges(google::cloud::channel::v1::ListEntitlementChangesRequest)

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::channel::v1::ListEntitlementChangesRequest
Returns
TypeDescription
StreamRange< google::cloud::channel::v1::EntitlementChange >