Repository to show how you could set up integration tests for Azure Search using xUnit and .NET Core.
⚠ If you use a free tier search service, or a basic tier with > 1 replica, you need to adjust
WaitForIndexing
(see comments in method).
To run this solution:
- Set up an Azure Search Service in your Azure Portal, note an Admin API Key
- Create a file
AzureSearchExample.Tests/appsettings.dev.json
(it is in the.gitignore
file) containing theapiKey
and thesearchServiceName
- Build
- Run the tests
All tests should be green. If they're not, see the above warning, or debug things yourself...