Skip to content

Automated PR feature/create-unittests into Main#20

Merged
joaoferreira-dev merged 3 commits into
mainfrom
feature/create-unittests
Feb 8, 2026
Merged

Automated PR feature/create-unittests into Main#20
joaoferreira-dev merged 3 commits into
mainfrom
feature/create-unittests

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot commented Feb 8, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AppDbContext configuration to support externally provided DbContextOptions (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.

Comment thread AirAware.sln
Comment thread AirAware/Data/AppDbContext.cs
Comment thread AirAware.Tests/Models/StationTests.cs Outdated
Comment thread AirAware.Tests/Models/AqiRecordTests.cs Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread AirAware.Tests/Models/ReadingTests.cs Outdated
Comment thread AirAware.Tests/Controllers/ReadingControllerTests.cs Outdated
Comment thread AirAware.Tests/README.md
@joaoferreira-dev joaoferreira-dev merged commit e3240bb into main Feb 8, 2026
1 check passed
@joaoferreira-dev joaoferreira-dev deleted the feature/create-unittests branch February 8, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create unit tests for API requests and Services

2 participants