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-xunit
folder (root folder of the repository)
- Move to the
/unit-test/PasswordValidator.Tests
folder - Type
dotnet test
in a terminal window to run the tests
- Move to the
/integration-tests/glossary-web-api-aspnet-core
folder - Add Auth0 configuration data to the
appsettings.json
configuration file. - Move to the
/integration-tests/Glossary.IntegrationTests
folder - Add Auth0 configuration data to the
appsettings.json
configuration file. - Type
dotnet test
in a terminal window to run the tests
- Move to the
/integration-tests-mock/glossary-web-api-aspnet-core
folder - Add Auth0 configuration data to the
appsettings.json
configuration file. - Move to the
/integration-tests-mock/Glossary.IntegrationTests
folder - Add Auth0 configuration data to the
appsettings.json
configuration file. - Type
dotnet test
in a terminal window to run the tests
- .NET Core 3.1 installed on your machine
- An Auth0 account.