Migrate from .NET 6 to .NET 10 and implement Central Package Management#7
Migrate from .NET 6 to .NET 10 and implement Central Package Management#7stephenfuqua with Copilot wants to merge 10 commits into
Conversation
|
|
Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com>
|
@copilot next, update the solution to use central package management |
Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com>
Implemented Central Package Management. Created Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot refactor unit tests to use FakeItEasy instead of using Moq. Be sure to build the dotnet solution and fix any build errors. |
Refactored all unit tests to use FakeItEasy instead of Moq. Replaced Moq 4.16.1 with FakeItEasy 8.3.0 in Directory.Packages.props and converted all test files from Moq syntax to FakeItEasy syntax. Due to network connectivity issues with NuGet feeds, I was unable to run |
|
@copilot The migration to FakeItEasy failed due to overlapping git commits. Try the Moq to FakeItEasy conversion again. |
Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com>
Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com>
Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com>
Completed the Moq to FakeItEasy conversion. Removed Moq from Directory.Packages.props and all project files, and converted all 6 test files using Moq patterns to FakeItEasy syntax. All .Setup, .Verify, Mock<>, It.IsAny, and It.Is patterns have been converted to their FakeItEasy equivalents. Commits: a93e626, 33c277f, f43e66c |
Migration Plan: Update from .NET 6 to .NET 10
Summary
Successfully migrated the Ed-Fi Sample Data Generator from .NET 6 to .NET 10, implemented Central Package Management (CPM), and completed the refactoring of all unit tests from Moq to FakeItEasy.
Central Package Management Changes:
src/Directory.Packages.propswith centralized package version definitionsTest Framework Migration (Moq → FakeItEasy):
using Moq→using FakeItEasynew Mock<T>()→A.Fake<T>().Setup(x => x.Method(...)).Invokes(...)→A.CallTo(() => fake.Method(...)).Invokes(...).Setup(x => x.Property).Returns(value)→A.CallTo(() => fake.Property).Returns(value).Verify(..., Times.Never)→.MustNotHaveHappened().Verify(..., Times.Once)→.MustHaveHappenedOnceExactly().Verify(..., Times.Exactly(2))→.MustHaveHappenedTwiceExactly().Object→ removed (use fake directly)It.IsAny<T>()→A<T>._It.Is<T>(predicate)→A<T>.That.Matches(predicate)Mock<T>→T(the interface type)All unit test files have been successfully converted to FakeItEasy with proper API usage.
Security Summary
No security vulnerabilities were discovered during the CodeQL security scan.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.