Application developers may want to test their code with simulated responses, including errors, from an object of type OsConfigZonalServiceClient. To do so, construct an object of type OsConfigZonalServiceClient 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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["This webpage provides documentation for the `MockOsConfigZonalServiceConnection` class, which is designed for simulating responses and errors in testing `OsConfigZonalServiceClient` objects."],["The class includes various mocked functions such as `CreateOSPolicyAssignment`, `UpdateOSPolicyAssignment`, and `GetOSPolicyAssignment`, among many other functions, which are implemented using gMock's `MOCK_METHOD()`."],["The page shows a list of versions, with `2.37.0-rc` being the latest, leading up to `2.11.0`, providing users with access to the documentation of each version."],["A link is provided to a BigQuery mock example to demonstrate how to implement tests using GoogleTest, as well as being a guide to implement the principles with any other `*Client` and `*Connection` pair."]]],[]]