Raven is a unit & integration testing practice project that implements a REST API that exposes simple CRUD operations. My goal is to try out the ideas from Vladimir Khorikov's Unit Testing: Principles, Practices and Patterns and Gerard Meszaros's xUnit Test Patterns while learning to use tools like:
- xUnit as my testing framework,
- FluentAssertions for writing readable assertions,
- Bogus for generating fake data,
- FakeItEasy for creatng fake objects and mocks,
- FluentMigrator for running migrations on test databases,
- TestContainers for creating throwaway test databases against which integration tests will be run,
- Coverlet for measuring code coverage,
- ReportGenerator for visualizing code coverage results,
- Microsoft.AspNetCore.Mvc.Testing for writing functional tests against the API.
API | Description | Request body | Response body |
---|---|---|---|
GET /api/users?searchType={searchType}&value={value} | Get a user whose information matches the given search value | None | Single user object |
POST /api/users | Add a user to the database | Single user details object | Operation response object |
PUT /api/users/{userid} | Update the details of the user whose ID is given | Single user details object | Operation response object |
DELETE /api/users/{userid} | Delete the user whose ID from the database | None | Operation response object |