platformplatform / PlatformPlatform

Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
https://platformplatform.github.io
MIT License
253 stars 26 forks source link

Add tests for signup and authentication endpoints #580

Closed tjementum closed 2 months ago

tjementum commented 2 months ago

Summary & Motivation

Add tests for the StartSignup and CompleteSignup command handlers and API endpoints, covering all code branches in the command handlers, including edge cases and error handling.

In addition to the new tests, the SqliteConnectionExtensions has been extended to allow seeding to streamline the insertion of test data into the database using SQL, making the test setup cleaner and more efficient. ApiAssertionExtensions has also been updated to check for a link in type only if defined in the Problem Details RFC #9110.

To improve test organization, tests have been split into separate files for each command and query, and logging assertions have been enabled for better insight into log messages. Lastly, the IEmailService is now properly registered during endpoint tests to ensure accurate testing of the email-related functionality.

Checklist

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud