Skip to content

Add unit test coverage for SharedCode.Core and SharedCode.Data#129

Merged
wforney merged 5 commits intomainfrom
copilot/add-unit-tests-for-libraries
Mar 8, 2026
Merged

Add unit test coverage for SharedCode.Core and SharedCode.Data#129
wforney merged 5 commits intomainfrom
copilot/add-unit-tests-for-libraries

Conversation

Copy link
Contributor

Copilot AI commented Mar 8, 2026

  • Fix pre-existing CA2251 build error in StringExtensions.cs
  • Fix pre-existing infinite recursion bug in EnumerableExtensions.Aggregate
  • Fix CI build failure: add Microsoft.EntityFrameworkCore.Relational package so AsSplitQuery() extension method resolves in AsSplitQueryEvaluator
  • Add comprehensive tests to SharedCode.Core.Tests (323 tests)
  • Create SharedCode.Data.Tests project (11 tests)
  • Add SharedCode.Data.Tests to solution
  • All new tests pass (323 Core.Tests + 11 Data.Tests)
Original prompt

This section details on the original issue you should resolve

<issue_title>Total lack of unit tests</issue_title>
<issue_description>We haven't had a decent amount of test coverage, well, ever. We should add some unit tests to cover all the libraries.</issue_description>

<agent_instructions>Add a test project for each project in the solution. Then add tests for all the code in each library.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 3 commits March 8, 2026 02:15
Co-authored-by: wforney <79032+wforney@users.noreply.github.com>
….Data projects

Co-authored-by: wforney <79032+wforney@users.noreply.github.com>
Co-authored-by: wforney <79032+wforney@users.noreply.github.com>
Copilot AI changed the title [WIP] Add unit tests for all libraries in the solution Add unit test coverage for SharedCode.Core and SharedCode.Data Mar 8, 2026
@wforney wforney marked this pull request as ready for review March 8, 2026 08:54
@wforney
Copy link
Member

wforney commented Mar 8, 2026

@copilot your build is failing.

Copy link
Contributor Author

Copilot AI commented Mar 8, 2026

@wforney The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 46e64cb1-b4d9-4dba-9b80-1e625727b3d0

@wforney
Copy link
Member

wforney commented Mar 8, 2026

@copilot Your build is failing

… build error

Co-authored-by: wforney <79032+wforney@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 8, 2026

@copilot Your build is failing

Fixed in commit 074865d. The CI failure was caused by a build error in SharedCode.Data.EntityFramework — the AsSplitQuery() extension method is defined in Microsoft.EntityFrameworkCore.Relational, but that package wasn't referenced. Added it to Directory.Packages.props and the EF project file. The solution now builds cleanly.

@copilot your build is failing.

Fixed in commit 074865d. The build was failing because AsSplitQuery() (used in AsSplitQueryEvaluator) requires Microsoft.EntityFrameworkCore.Relational which wasn't referenced. Added the package to Directory.Packages.props and Data.EntityFramework.csproj.

@wforney wforney merged commit 494ce21 into main Mar 8, 2026
2 checks passed
@wforney wforney deleted the copilot/add-unit-tests-for-libraries branch March 8, 2026 09:47
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.

Total lack of unit tests

2 participants