This repository contains three folders with the .NET Core projects showing how to use xUnit to create unit and integration tests for C# applications.
The following article describes the implementation details: Using xUnit to Test your C# Code
- Clone the repo:
git clone https://github.com/auth0-blog/unit-integration-test-xunit.git - Move to the
unit-integration-test-xunitfolder (root folder of the repository)
- Move to the
/unit-test/PasswordValidator.Testsfolder - Type
dotnet testin a terminal window to run the tests
- Move to the
/integration-tests/glossary-web-api-aspnet-corefolder - Add Auth0 configuration data to the
appsettings.jsonconfiguration file. - Move to the
/integration-tests/Glossary.IntegrationTestsfolder - Add Auth0 configuration data to the
appsettings.jsonconfiguration file. - Type
dotnet testin a terminal window to run the tests
- Move to the
/integration-tests-mock/glossary-web-api-aspnet-corefolder - Add Auth0 configuration data to the
appsettings.jsonconfiguration file. - Move to the
/integration-tests-mock/Glossary.IntegrationTestsfolder - Add Auth0 configuration data to the
appsettings.jsonconfiguration file. - Type
dotnet testin a terminal window to run the tests
- .NET Core 3.1 installed on your machine
- An Auth0 account.