Class MockWorkstationsConnection (2.18.0-rc)

A class to mock WorkstationsConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type WorkstationsClient. To do so, construct an object of type WorkstationsClient 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 GetWorkstationCluster(google::cloud::workstations::v1::GetWorkstationClusterRequest 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::workstations::v1::GetWorkstationClusterRequest const &
Returns
TypeDescription
StatusOr< google::cloud::workstations::v1::WorkstationCluster >

virtual ListWorkstationClusters(google::cloud::workstations::v1::ListWorkstationClustersRequest)

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::workstations::v1::ListWorkstationClustersRequest
Returns
TypeDescription
StreamRange< google::cloud::workstations::v1::WorkstationCluster >

virtual CreateWorkstationCluster(google::cloud::workstations::v1::CreateWorkstationClusterRequest 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::workstations::v1::CreateWorkstationClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationCluster > >

virtual UpdateWorkstationCluster(google::cloud::workstations::v1::UpdateWorkstationClusterRequest 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::workstations::v1::UpdateWorkstationClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationCluster > >

virtual DeleteWorkstationCluster(google::cloud::workstations::v1::DeleteWorkstationClusterRequest 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::workstations::v1::DeleteWorkstationClusterRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationCluster > >

virtual GetWorkstationConfig(google::cloud::workstations::v1::GetWorkstationConfigRequest 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::workstations::v1::GetWorkstationConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::workstations::v1::WorkstationConfig >

virtual ListWorkstationConfigs(google::cloud::workstations::v1::ListWorkstationConfigsRequest)

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::workstations::v1::ListWorkstationConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::workstations::v1::WorkstationConfig >

virtual ListUsableWorkstationConfigs(google::cloud::workstations::v1::ListUsableWorkstationConfigsRequest)

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::workstations::v1::ListUsableWorkstationConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::workstations::v1::WorkstationConfig >

virtual CreateWorkstationConfig(google::cloud::workstations::v1::CreateWorkstationConfigRequest 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::workstations::v1::CreateWorkstationConfigRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationConfig > >

virtual UpdateWorkstationConfig(google::cloud::workstations::v1::UpdateWorkstationConfigRequest 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::workstations::v1::UpdateWorkstationConfigRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationConfig > >

virtual DeleteWorkstationConfig(google::cloud::workstations::v1::DeleteWorkstationConfigRequest 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::workstations::v1::DeleteWorkstationConfigRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::WorkstationConfig > >

virtual GetWorkstation(google::cloud::workstations::v1::GetWorkstationRequest 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::workstations::v1::GetWorkstationRequest const &
Returns
TypeDescription
StatusOr< google::cloud::workstations::v1::Workstation >

virtual ListWorkstations(google::cloud::workstations::v1::ListWorkstationsRequest)

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::workstations::v1::ListWorkstationsRequest
Returns
TypeDescription
StreamRange< google::cloud::workstations::v1::Workstation >

virtual ListUsableWorkstations(google::cloud::workstations::v1::ListUsableWorkstationsRequest)

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::workstations::v1::ListUsableWorkstationsRequest
Returns
TypeDescription
StreamRange< google::cloud::workstations::v1::Workstation >

virtual CreateWorkstation(google::cloud::workstations::v1::CreateWorkstationRequest 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::workstations::v1::CreateWorkstationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::Workstation > >

virtual UpdateWorkstation(google::cloud::workstations::v1::UpdateWorkstationRequest 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::workstations::v1::UpdateWorkstationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::Workstation > >

virtual DeleteWorkstation(google::cloud::workstations::v1::DeleteWorkstationRequest 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::workstations::v1::DeleteWorkstationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::Workstation > >

virtual StartWorkstation(google::cloud::workstations::v1::StartWorkstationRequest 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::workstations::v1::StartWorkstationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::Workstation > >

virtual StopWorkstation(google::cloud::workstations::v1::StopWorkstationRequest 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::workstations::v1::StopWorkstationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::workstations::v1::Workstation > >

virtual GenerateAccessToken(google::cloud::workstations::v1::GenerateAccessTokenRequest 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::workstations::v1::GenerateAccessTokenRequest const &
Returns
TypeDescription
StatusOr< google::cloud::workstations::v1::GenerateAccessTokenResponse >