Automated PR feature/create-unittests into Main#20
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new xUnit-based test suite for the AirAware .NET API (services/controllers/models), updates the solution to include the test project, and expands project documentation to describe the system and testing approach.
Changes:
- Added unit tests for AQI calculation, controller endpoints, and model defaults/behaviors.
- Updated
AppDbContextconfiguration to support externally providedDbContextOptions(e.g., InMemory provider in tests). - Rewrote/expanded README documentation for API usage, architecture, and testing.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Expanded product/API documentation, endpoints, and testing notes. |
| AirAware/Data/AppDbContext.cs | Adds constructors and guards OnConfiguring so tests can inject options without forcing SQLite. |
| AirAware.sln | Adds AirAware.Tests project and additional platform configs. |
| AirAware.Tests/Services/EpaAqiCalculatorTests.cs | Adds AQI calculator unit tests (PM2.5/PM10 breakpoints, interpolation, capping, final selection). |
| AirAware.Tests/README.md | Adds test-suite documentation and structure/coverage overview. |
| AirAware.Tests/Models/StationTests.cs | Adds model default/value behavior tests for Station. |
| AirAware.Tests/Models/ReadingTests.cs | Adds model default/value behavior tests for Reading. |
| AirAware.Tests/Models/AqiRecordTests.cs | Adds model default/value behavior tests for AqiRecord. |
| AirAware.Tests/Controllers/StationControllerTests.cs | Adds in-memory EF Core tests for station endpoints. |
| AirAware.Tests/Controllers/ReadingControllerTests.cs | Adds in-memory EF Core + Moq tests for reading ingestion and payload parsing behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joaoferreira-dev
approved these changes
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.