You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var elasticsearchClient = new Mock<ElasticsearchClient>();
var response = TestableResponseFactory.CreateSuccessfulResponse<StringResponse>(new(), 200);
elasticsearchClient.Setup(x => x.Transport.RequestAsync<StringResponse>(
It.IsAny<HttpMethod>(),
It.IsAny<string>(),
It.IsAny<PostData>(),
It.IsAny<RequestParameters>(),
It.IsAny<OpenTelemetryData>(),
It.IsAny<CancellationToken>())).ReturnsAsync(response);
I'm getting this in Moq: Non-overridable members (here: HttpTransport.RequestAsync) may not be used in setup / verification expressions. @flobernd@stevejgordon@Mpdreamz
The text was updated successfully, but these errors were encountered:
The documentation is very limited.
https://github.com/elastic/elastic-transport-net/blob/main/README.md#mocking-response-objects-for-testing
I'm getting this in Moq:
Non-overridable members (here: HttpTransport.RequestAsync) may not be used in setup / verification expressions.
@flobernd @stevejgordon @Mpdreamz
The text was updated successfully, but these errors were encountered: