Application developers may want to test their code with simulated responses, including errors, from an object of type EkmServiceClient. To do so, construct an object of type EkmServiceClient 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-03-14 UTC."],[[["This document outlines the `MockEkmServiceConnection` class, which is designed for simulating responses and errors in testing applications that use `EkmServiceClient`."],["The `MockEkmServiceConnection` class is intended to be used with the Google Test framework to enable controlled testing environments with pre-programmed behaviors."],["This mock class provides several virtual functions, such as `options()`, `ListEkmConnections()`, `GetEkmConnection()`, `CreateEkmConnection()`, `UpdateEkmConnection()`, `GetEkmConfig()`, `UpdateEkmConfig()`, and `VerifyConnectivity()`, all of which are implemented using gMock's `MOCK_METHOD()`."],["The webpage contains the documentation for the following versions of `MockEkmServiceConnection`: 2.37.0-rc, 2.36.0, 2.35.0, 2.34.0, 2.33.0, 2.32.0, 2.31.0, 2.30.0, 2.29.0, 2.28.0, 2.27.0, 2.26.0, 2.25.1, 2.24.0, 2.23.0, 2.22.0, 2.21.0, 2.20.0, 2.19.0, 2.18.0, 2.17.0, 2.16.0, 2.15.1, 2.14.0, 2.13.0, 2.12.0, 2.11.0, and 2.10.1."]]],[]]