I have a class like in the example bellow and i want to unit test the method UpdateDocumentAsync, but I don't know how. Do you have an idea how can i test it please ?
public class MyElasticSearchClient
{
private readonly IElasticClient client;
...
public async Task<bool> UpdateDocumentAsync<T>(string index, string type, string id, T updated) where T : class
{
var response = await client.UpdateAsync<T, object>(u => u
.Index(index)
.Type(type)
.Id(id)
.Doc(updated)
.RetryOnConflict(3)
.Refresh()
).ConfigureAwait(false);
return response.ConnectionStatus.Success;
}
}