opensearch-net icon indicating copy to clipboard operation
opensearch-net copied to clipboard

Support mocking and testing of ClusterNamespace

Open binarypatrick opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

Non-virtual/non-interface implementations of OpenSearch.Client.Specification.ClusterApi.ClusterNamespace makes mocking cluster health checks impossible.

What solution would you like?

Make methods virtual, or implement interface type for ClusterNamespace in IOpenSearchClient or make methods in ClusterNamespace virtual.

What alternatives have you considered?

There isn't another good way to do this. Mocking packages should only mock interfaces or public virtual methods.

Do you have any additional context?

image

binarypatrick avatar Nov 07 '23 14:11 binarypatrick