Class MockGameServerClustersServiceConnection (2.12.0)

A class to mock GameServerClustersServiceConnection.

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

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::gaming::v1::ListGameServerClustersRequest
Returns
TypeDescription
StreamRange< google::cloud::gaming::v1::GameServerCluster >

virtual GetGameServerCluster(google::cloud::gaming::v1::GetGameServerClusterRequest 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::gaming::v1::GetGameServerClusterRequest const &
Returns
TypeDescription
StatusOr< google::cloud::gaming::v1::GameServerCluster >

virtual CreateGameServerCluster(google::cloud::gaming::v1::CreateGameServerClusterRequest 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::gaming::v1::CreateGameServerClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::gaming::v1::GameServerCluster > >

virtual PreviewCreateGameServerCluster(google::cloud::gaming::v1::PreviewCreateGameServerClusterRequest 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::gaming::v1::PreviewCreateGameServerClusterRequest const &
Returns
TypeDescription
StatusOr< google::cloud::gaming::v1::PreviewCreateGameServerClusterResponse >

virtual DeleteGameServerCluster(google::cloud::gaming::v1::DeleteGameServerClusterRequest 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::gaming::v1::DeleteGameServerClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::gaming::v1::OperationMetadata > >

virtual PreviewDeleteGameServerCluster(google::cloud::gaming::v1::PreviewDeleteGameServerClusterRequest 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::gaming::v1::PreviewDeleteGameServerClusterRequest const &
Returns
TypeDescription
StatusOr< google::cloud::gaming::v1::PreviewDeleteGameServerClusterResponse >

virtual UpdateGameServerCluster(google::cloud::gaming::v1::UpdateGameServerClusterRequest 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::gaming::v1::UpdateGameServerClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::gaming::v1::GameServerCluster > >

virtual PreviewUpdateGameServerCluster(google::cloud::gaming::v1::PreviewUpdateGameServerClusterRequest 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::gaming::v1::PreviewUpdateGameServerClusterRequest const &
Returns
TypeDescription
StatusOr< google::cloud::gaming::v1::PreviewUpdateGameServerClusterResponse >