A class to mock GameServerDeploymentsServiceConnection.
Application developers may want to test their code with simulated responses, including errors, from an object of type GameServerDeploymentsServiceClient. To do so, construct an object of type GameServerDeploymentsServiceClient 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eMockGameServerDeploymentsServiceConnection\u003c/code\u003e class, which is used to simulate responses from a \u003ccode\u003eGameServerDeploymentsServiceClient\u003c/code\u003e for testing purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe class utilizes GoogleTest's gMock framework, and its functions are implemented using \u003ccode\u003eMOCK_METHOD()\u003c/code\u003e, allowing developers to program the mock's behavior in tests.\u003c/p\u003e\n"],["\u003cp\u003eSeveral mockable methods are available, including \u003ccode\u003eListGameServerDeployments\u003c/code\u003e, \u003ccode\u003eGetGameServerDeployment\u003c/code\u003e, \u003ccode\u003eCreateGameServerDeployment\u003c/code\u003e, \u003ccode\u003eDeleteGameServerDeployment\u003c/code\u003e, and others, all pertaining to managing game server deployments.\u003c/p\u003e\n"],["\u003cp\u003eThis class and its methods allow for testing with simulated responses, including errors, to verify the application's handling of a \u003ccode\u003eGameServerDeploymentsServiceClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe provided example references how to use this class in the context of testing, and while it uses BigQuery, the underlying principles are applicable to any \u003ccode\u003e*Client\u003c/code\u003e and \u003ccode\u003e*Connection\u003c/code\u003e pair.\u003c/p\u003e\n"]]],[],null,[]]