The service provides functionality to create/read/update/delete users via Web API. All data is stored in SQL Server 2019.
To run both SQL Server and Users API run the following:
echo 'SA_PASSWORD=SomePassword123' > .env
docker-compose up
Then open your browser at http://localhost:5000/swagger/index.html
for Swagger UI or use Postman/curl to access API.
Execute the following to run all tests using the SQLite In-Memory database:
dotnet test --filter Mapper
dotnet test --filter Sqlite
To test using SQL Server use the following. Note that these tests will take much longer and may fail when run concurrently.
# Show list of tests.
dotnet test -t
# Execute tests from class SqlServerUsersControllerTests.
dotnet test --filter SqlServerUsersControllerTests
- Admin - admin group and changing a user to be in the admin group.
- Auth - password hashing for newly created users.
- Db - DbContext and migrations.
- Models - entities and enums.
- Signup - timeout after user creation for other requests to create a user with the same login.
- WebApi - controllers and configuration.