Skip to content

Update dependency Moq to 4.21.0 - #677

Merged
alexaka1 merged 1 commit into
mainfrom
renovate/moq-4.x
Oct 2, 2026
Merged

alexaka1 merged 1 commit into
mainfrom
renovate/moq-4.x

Conversation

@renovate

@renovate renovate Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
Moq 4.20.72 → 4.21.0 age adoption passing confidence

Release Notes

moq/moq (Moq)

v4.21.0

Full Changelog

✨ Implemented enhancements:

  • Constructor arguments should be nullable #​1494
  • Moq "set" matcher fails when setting StringValues with string #​1465
  • Add the ability to compare ref argument by value #​1437
  • The public API is still missing nullable reference type annotations #​1418
  • "Invalid Callback" in NonVoidSetupPhrase.Returns -> ValidateCallbackReturnType is not informative or actionable #​1297
  • Allow passing method parameters to Throws/ThrowsAsync #​1296
  • Fail message on VerifyNoOtherCalls #​1263
  • Custom formatter for error messages #​1144
  • SetupSequence: CallBase Support for Void methods #​1096
  • Ability to specify proxy generator or invalidate it #​925
  • Performance improvement for Mocking many large classes #​1530 (@​crinksdr)
  • Updated ctor params to support nullable args #​1518 (@​Asafima)
  • Improve performance of It.Is matcher when used with an expression by compiling only once #​1512 (@​peterder72)

🐛 Fixed bugs:

  • Unit tests using Moq fail with runtime error after updating Moq to 4.20.72 (failure to load System.Threading.Tasks.Extensions) #​1648
  • [4.20.72] Missing XML Documentation #​1632
  • CollectionBuilderAttribute not considered for "default empty" #​1565
  • MockException reports wrong invocation list #​1534
  • Weird issue using spread operator on IEnumerable<Task> when using mocked methods #​1526
  • Changes made between 4.14.7 and 4.15.1 break exception handling #​1519
  • Generic method setups of parent types invoked #​1498
  • IVerifies.Verifiable* documentation comments errata? #​1481
  • It.IsAny<StructObject>() isn't #​1466
  • Mock.Protected().Verify fails sometimes #​1464
  • VerifySet throws TargetInvocationException when constructer refers to itself #​1455
  • Wrong Setup by using String interpolation within It.Is<string> #​1439
  • Cannot cast inside the Action<T> parameter of Verify method #​1438
  • mock.Invocations.Clear() violates self-consistency of inner mocks #​1120
  • Fix #​1648 reliably (lazy ValueTask registration + committed harness verification) #​1680 (@​kzu)
  • Minor enhancement to avoid null exceptions #​1542 (@​ShirAvneri)

🔨 Other:

  • Example for Scenario not covered in Examples #​1655
  • Adding Try Catch to Method returns empty List #​1595
  • Will Native AOT supported in future? #​1552
  • Possibility of adding Callback to ISetupSequentialAction #​1541
  • Mock.VerifyAll() with no parameters passed in should throw ArgumentOutOfRangeException #​1540
  • Could we add Verify methods to IMock<T>? #​1538
  • [FeatureRequest] Allow setting the default MockBehavior constructor parameter value #​1537
  • Question: Will parallel running mess up invocation counts? #​1536
  • Minor enhancement to avoid null exceptions. #​1533
  • Unable to use Callback or Returns on methods with more than 16 parameters. #​1531
  • Add Way to Exclude Calls from VerifyNoOtherCalls #​1490
  • Semantic error in unit test MatchesIsNotInEnumerable()? #​1483
  • Moq Setup does not work with "object" as generic type? #​1478
  • Explicit support for matching cancellation tokens with It class. (It.IsCancellationToken()) #​1477
  • Request: Ability to setup a property of type Task<ConcreteType> by mocking interface #​1460
  • Add ability for asynchronously waiting for an invocation #​1457
  • DefaultValueProvider extensibility #​1450
  • Should allow null references as constructor parameters. #​1416
  • Support Static Abstract property #​1398
  • IProtectedMock fails on a new virtual methods #​1341
  • Mocking an interface that has a sealed implementation of a method #​1334
  • Issue with multiple identical setups #​1330
  • Proper usage of It.IsAnyType #​1329
  • Better (Async) support for method returning nongeneric Task #​1328
  • Opt in parameters matching logic #​1267
  • Invocations.Clear() does not work on recursive mocks #​1242
  • VerifyNoOtherCalls fails reporting issue with different mock when using factory pattern #​1181
  • InSequence is not available for protected #​1173
  • MockRepository.Verify() also verifies mocks created outside of the repo #​1018
  • Cannot mock subclass of superclass with internal virtual methods #​991

🔀 Merged:


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Pull requests that update a dependency file dotnet labels Sep 27, 2026
@changeset-bot

changeset-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3f2cfa4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednuget/​moq@​4.20.72 ⏵ 4.21.09710090100100

View full report

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

98 passed 98 passed
98 passed 98 passed
98 passed 98 passed

🧪 Details on Microsoft Windows 10.0.26100
🧪 Details on macOS Unix 26.6.2
🧪 Details on Ubuntu 24.04.5 LTS

from dotnet-trx v1.0.1 on .NET 10.0.12 with 💜 by @devlooped

@github-actions

Copy link
Copy Markdown
Contributor

Platform: macos-latest

Code Coverage

Package Line Rate Branch Rate Complexity Health
Serilog.Extensions.Formatting 95% 85% 148 ✔
Summary 95% (214 / 225) 85% (110 / 130) 148 ✔

@github-actions

Copy link
Copy Markdown
Contributor

Platform: ubuntu-latest

Code Coverage

Package Line Rate Branch Rate Complexity Health
Serilog.Extensions.Formatting 95% 85% 148 ✔
Summary 95% (214 / 225) 85% (110 / 130) 148 ✔

@github-actions

Copy link
Copy Markdown
Contributor

Platform: windows-latest

Code Coverage

Package Line Rate Branch Rate Complexity Health
Serilog.Extensions.Formatting 95% 85% 148 ✔
Summary 95% (214 / 225) 85% (110 / 130) 148 ✔

@alexaka1 alexaka1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Auto-approved per Renovate auto-merge policy

@alexaka1
alexaka1 merged commit 8d30d8a into main Oct 2, 2026
21 checks passed
@alexaka1
alexaka1 deleted the renovate/moq-4.x branch October 2, 2026 09:44
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 dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant