Google Cloud Spanner C++ Client  2.1.0
A C++ Client Library for Google Cloud Spanner
Public Member Functions | List of all members
google::cloud::spanner_admin_mocks::MockInstanceAdminConnection Class Reference

A class to mock InstanceAdminConnection. More...

#include <google/cloud/spanner/admin/mocks/mock_instance_admin_connection.h>

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StreamRange< google::spanner::admin::instance::v1::InstanceConfig >, ListInstanceConfigs,(google::spanner::admin::instance::v1::ListInstanceConfigsRequest request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::instance::v1::InstanceConfig >, GetInstanceConfig,(google::spanner::admin::instance::v1::GetInstanceConfigRequest const &request),(override))
 
 MOCK_METHOD (StreamRange< google::spanner::admin::instance::v1::Instance >, ListInstances,(google::spanner::admin::instance::v1::ListInstancesRequest request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::instance::v1::Instance >, GetInstance,(google::spanner::admin::instance::v1::GetInstanceRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::instance::v1::Instance >>, CreateInstance,(google::spanner::admin::instance::v1::CreateInstanceRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::instance::v1::Instance >>, UpdateInstance,(google::spanner::admin::instance::v1::UpdateInstanceRequest const &request),(override))
 
 MOCK_METHOD (Status, DeleteInstance,(google::spanner::admin::instance::v1::DeleteInstanceRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, SetIamPolicy,(google::iam::v1::SetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, GetIamPolicy,(google::iam::v1::GetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::TestIamPermissionsResponse >, TestIamPermissions,(google::iam::v1::TestIamPermissionsRequest const &request),(override))
 
virtual Options options ()
 
virtual StreamRange< google::spanner::admin::instance::v1::InstanceConfig > ListInstanceConfigs (google::spanner::admin::instance::v1::ListInstanceConfigsRequest request)
 
virtual StatusOr< google::spanner::admin::instance::v1::InstanceConfig > GetInstanceConfig (google::spanner::admin::instance::v1::GetInstanceConfigRequest const &request)
 
virtual StreamRange< google::spanner::admin::instance::v1::Instance > ListInstances (google::spanner::admin::instance::v1::ListInstancesRequest request)
 
virtual StatusOr< google::spanner::admin::instance::v1::Instance > GetInstance (google::spanner::admin::instance::v1::GetInstanceRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > CreateInstance (google::spanner::admin::instance::v1::CreateInstanceRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > UpdateInstance (google::spanner::admin::instance::v1::UpdateInstanceRequest const &request)
 
virtual Status DeleteInstance (google::spanner::admin::instance::v1::DeleteInstanceRequest const &request)
 
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy (google::iam::v1::SetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy (google::iam::v1::GetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions (google::iam::v1::TestIamPermissionsRequest const &request)
 

Detailed Description

A class to mock InstanceAdminConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type InstanceAdminClient. To do so, construct an object of type InstanceAdminClient 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.

Definition at line 45 of file mock_instance_admin_connection.h.

Member Function Documentation

◆ CreateInstance()

virtual future<StatusOr<google::spanner::admin::instance::v1::Instance> > google::cloud::spanner_admin::InstanceAdminConnection::CreateInstance ( google::spanner::admin::instance::v1::CreateInstanceRequest const &  request)
virtualinherited

◆ DeleteInstance()

virtual Status google::cloud::spanner_admin::InstanceAdminConnection::DeleteInstance ( google::spanner::admin::instance::v1::DeleteInstanceRequest const &  request)
virtualinherited

◆ GetIamPolicy()

virtual StatusOr<google::iam::v1::Policy> google::cloud::spanner_admin::InstanceAdminConnection::GetIamPolicy ( google::iam::v1::GetIamPolicyRequest const &  request)
virtualinherited

◆ GetInstance()

virtual StatusOr<google::spanner::admin::instance::v1::Instance> google::cloud::spanner_admin::InstanceAdminConnection::GetInstance ( google::spanner::admin::instance::v1::GetInstanceRequest const &  request)
virtualinherited

◆ GetInstanceConfig()

virtual StatusOr<google::spanner::admin::instance::v1::InstanceConfig> google::cloud::spanner_admin::InstanceAdminConnection::GetInstanceConfig ( google::spanner::admin::instance::v1::GetInstanceConfigRequest const &  request)
virtualinherited

◆ ListInstanceConfigs()

virtual StreamRange<google::spanner::admin::instance::v1::InstanceConfig> google::cloud::spanner_admin::InstanceAdminConnection::ListInstanceConfigs ( google::spanner::admin::instance::v1::ListInstanceConfigsRequest  request)
virtualinherited

◆ ListInstances()

virtual StreamRange<google::spanner::admin::instance::v1::Instance> google::cloud::spanner_admin::InstanceAdminConnection::ListInstances ( google::spanner::admin::instance::v1::ListInstancesRequest  request)
virtualinherited

◆ MOCK_METHOD() [1/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::instance::v1::Instance >>  ,
CreateInstance  ,
(google::spanner::admin::instance::v1::CreateInstanceRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [2/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::instance::v1::Instance >>  ,
UpdateInstance  ,
(google::spanner::admin::instance::v1::UpdateInstanceRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [4/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( Status  ,
DeleteInstance  ,
(google::spanner::admin::instance::v1::DeleteInstanceRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [5/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
GetIamPolicy  ,
(google::iam::v1::GetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [6/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
SetIamPolicy  ,
(google::iam::v1::SetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [7/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::TestIamPermissionsResponse >  ,
TestIamPermissions  ,
(google::iam::v1::TestIamPermissionsRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [8/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::instance::v1::Instance >  ,
GetInstance  ,
(google::spanner::admin::instance::v1::GetInstanceRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [9/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::instance::v1::InstanceConfig >  ,
GetInstanceConfig  ,
(google::spanner::admin::instance::v1::GetInstanceConfigRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [10/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StreamRange< google::spanner::admin::instance::v1::Instance >  ,
ListInstances  ,
(google::spanner::admin::instance::v1::ListInstancesRequest request)  ,
(override)   
)

◆ MOCK_METHOD() [11/11]

google::cloud::spanner_admin_mocks::MockInstanceAdminConnection::MOCK_METHOD ( StreamRange< google::spanner::admin::instance::v1::InstanceConfig >  ,
ListInstanceConfigs  ,
(google::spanner::admin::instance::v1::ListInstanceConfigsRequest request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::spanner_admin::InstanceAdminConnection::options ( )
inlinevirtualinherited

Definition at line 68 of file instance_admin_connection.h.

◆ SetIamPolicy()

virtual StatusOr<google::iam::v1::Policy> google::cloud::spanner_admin::InstanceAdminConnection::SetIamPolicy ( google::iam::v1::SetIamPolicyRequest const &  request)
virtualinherited

◆ TestIamPermissions()

virtual StatusOr<google::iam::v1::TestIamPermissionsResponse> google::cloud::spanner_admin::InstanceAdminConnection::TestIamPermissions ( google::iam::v1::TestIamPermissionsRequest const &  request)
virtualinherited

◆ UpdateInstance()

virtual future<StatusOr<google::spanner::admin::instance::v1::Instance> > google::cloud::spanner_admin::InstanceAdminConnection::UpdateInstance ( google::spanner::admin::instance::v1::UpdateInstanceRequest const &  request)
virtualinherited