Skip to content

Bump Moq from 4.20.70 to 4.21.0 - #508

Open
DavidJGapCR wants to merge 1 commit into
mainfrom
dependabot-recreate/Moq-4.21.0
Open

DavidJGapCR wants to merge 1 commit into
mainfrom
dependabot-recreate/Moq-4.21.0

Conversation

@DavidJGapCR

Copy link
Copy Markdown
Contributor

Recreates #505, which Dependabot closed with "Looks like Moq is no longer updatable". That's incorrect: main still pins 4.20.70 in Application/Directory.Packages.props, and it's referenced directly by DBTests, V1.DBTests and V3.DBTests. (Note: #191 had already moved Moq to 4.20.72, but #237 appears to have reverted it to 4.20.70.)

Changes

  • Bump central version of Moq 4.20.70 → 4.21.0 (release notes). The package contains only lib/ assemblies (no analyzers or build targets) and depends only on Castle.Core / System.Threading.Tasks.Extensions.
  • Regenerate packages.lock.json for the 3 DB test projects (same file set as Bump Moq from 4.20.70 to 4.21.0 #505).
  • Fix a build break in EducationOrganizationServiceTests.cs (DBTests and V3.DBTests): Moq 4.21.0 enables nullable annotations, so the It.Is<It.IsAnyType> predicate value is now nullable (CS8602 as error). Added a v != null && guard; ?. and is not null aren't allowed in expression trees.

Verification

  • dotnet restore --force-evaluate + Release build: 0 warnings, 0 errors.
  • Unit tests: Common (125), InstanceManagement (60), AdminApi (600 + 10 skipped), V3 (600) all pass.
  • DB tests not run locally (no SQL Server available); relying on the CI integration test job.

🤖 Generated with Claude Code

Recreates #505, which Dependabot closed as "no longer updatable"
even though main still pins 4.20.70.

Moq 4.21.0 enables nullable annotations, so the It.IsAnyType matcher
value is now nullable. Add a null check in the logger Verify predicate
(?. is not allowed in expression trees) to keep the DBTests building
with warnings as errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DavidJGapCR DavidJGapCR added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

   12 files     12 suites   57s ⏱️
1 397 tests 1 385 ✅ 12 💤 0 ❌
4 191 runs  4 155 ✅ 36 💤 0 ❌

Results for commit e7186bd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant