[PR #5047] [MERGED] Bump Moq from 4.15.2 to 4.16.0 #10372

Closed
opened 2026-02-07 06:19:09 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5047
Author: @dependabot[bot]
Created: 1/18/2021
Status: Merged
Merged: 1/23/2021
Merged by: @Bond-009

Base: masterHead: dependabot/nuget/Moq-4.16.0


📝 Commits (1)

  • 1bc1d1c Bump Moq from 4.15.2 to 4.16.0

📊 Changes

4 files changed (+4 additions, -4 deletions)

View changed files

📝 tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj (+1 -1)
📝 tests/Jellyfin.Networking.Tests/NetworkTesting/Jellyfin.Networking.Tests.csproj (+1 -1)
📝 tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj (+1 -1)
📝 tests/Jellyfin.XbmcMetadata.Tests/Jellyfin.XbmcMetadata.Tests.csproj (+1 -1)

📄 Description

Bumps Moq from 4.15.2 to 4.16.0.

Changelog

Sourced from Moq's changelog.

4.16.0 (2021-01-16)

Added

  • Ability to directly set up the .Result of tasks and value tasks, which makes setup expressions more uniform by rendering dedicated async verbs like .ReturnsAsync, .ThrowsAsync, etc. unnecessary:

    -mock.Setup(x => x.GetFooAsync()).ReturnsAsync(foo)
    +mock.Setup(x => x.GetFooAsync().Result).Returns(foo)
    

    This is useful in places where there currently aren't any such async verbs at all:

    -Mock.Of<X>(x => x.GetFooAsync() == Task.FromResult(foo))
    +Mock.Of<X>(x => x.GetFooAsync().Result == foo)
    

    This also allows recursive setups / method chaining across async calls inside a single setup expression:

    -mock.Setup(x => x.GetFooAsync()).ReturnsAsync(Mock.Of<IFoo>(f => f.Bar == bar))
    +mock.Setup(x => x.GetFooAsync().Result.Bar).Returns(bar)
    

    or, with only Mock.Of:

    -Mock.Of<X>(x => x.GetFooAsync() == Task.FromResult(Mock.Of<IFoo>(f => f.Bar == bar)))
    +Mock.Of<X>(x => x.GetFooAsync().Result.Bar == bar)
    

    This should work in all principal setup methods (Mock.Of, mock.Setup…, mock.Verify…). Support in mock.Protected() and for custom awaitable types may be added in the future. (@stakx, #1126)

Changed

  • Attempts to mark conditionals setup as verifiable are once again allowed; it turns out that forbidding it (as was done in #997 for version 4.14.0) is in fact a regression. (@stakx, #1121)

Fixed

  • Performance regression: Adding setups to a mock becomes slower with each setup (@CeesKaas, #1110)

  • Regression: mock.Verify[All] no longer marks invocations as verified if they were matched by conditional setups. (@Lyra2108, #1114)

Commits
  • 74d5863 Update version to 4.16.0
  • 424fe31 Fix typo in changelog
  • f48c0f4 Merge pull request #1126 from stakx/setup-task-result
  • 6f6a89d Update the changelog
  • 66bcb21 Enable task.Result in delegate-based setup methods
  • 42521c4 Add ability in IAwaitableFactory to create result expression
  • 187902c Enable task.Result for expression-based setup methods
  • 5802db8 Support faulted awaitables in IAwaitableFactory
  • 047bf95 Add tests for task.Result setups
  • bab305e Merge pull request #1125 from stakx/awaitable-factories
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/5047 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 1/18/2021 **Status:** ✅ Merged **Merged:** 1/23/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `dependabot/nuget/Moq-4.16.0` --- ### 📝 Commits (1) - [`1bc1d1c`](https://github.com/jellyfin/jellyfin/commit/1bc1d1c07b66433c3ae5e30398023adda817ebe9) Bump Moq from 4.15.2 to 4.16.0 ### 📊 Changes **4 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj` (+1 -1) 📝 `tests/Jellyfin.Networking.Tests/NetworkTesting/Jellyfin.Networking.Tests.csproj` (+1 -1) 📝 `tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj` (+1 -1) 📝 `tests/Jellyfin.XbmcMetadata.Tests/Jellyfin.XbmcMetadata.Tests.csproj` (+1 -1) </details> ### 📄 Description Bumps [Moq](https://github.com/moq/moq4) from 4.15.2 to 4.16.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/moq/moq4/blob/main/CHANGELOG.md">Moq's changelog</a>.</em></p> <blockquote> <h2>4.16.0 (2021-01-16)</h2> <h4>Added</h4> <ul> <li> <p>Ability to directly set up the <code>.Result</code> of tasks and value tasks, which makes setup expressions more uniform by rendering dedicated async verbs like <code>.ReturnsAsync</code>, <code>.ThrowsAsync</code>, etc. unnecessary:</p> <pre lang="diff"><code>-mock.Setup(x =&gt; x.GetFooAsync()).ReturnsAsync(foo) +mock.Setup(x =&gt; x.GetFooAsync().Result).Returns(foo) </code></pre> <p>This is useful in places where there currently aren't any such async verbs at all:</p> <pre lang="diff"><code>-Mock.Of&lt;X&gt;(x =&gt; x.GetFooAsync() == Task.FromResult(foo)) +Mock.Of&lt;X&gt;(x =&gt; x.GetFooAsync().Result == foo) </code></pre> <p>This also allows recursive setups / method chaining across async calls inside a single setup expression:</p> <pre lang="diff"><code>-mock.Setup(x =&gt; x.GetFooAsync()).ReturnsAsync(Mock.Of&lt;IFoo&gt;(f =&gt; f.Bar == bar)) +mock.Setup(x =&gt; x.GetFooAsync().Result.Bar).Returns(bar) </code></pre> <p>or, with only <code>Mock.Of</code>:</p> <pre lang="diff"><code>-Mock.Of&lt;X&gt;(x =&gt; x.GetFooAsync() == Task.FromResult(Mock.Of&lt;IFoo&gt;(f =&gt; f.Bar == bar))) +Mock.Of&lt;X&gt;(x =&gt; x.GetFooAsync().Result.Bar == bar) </code></pre> <p>This should work in all principal setup methods (<code>Mock.Of</code>, <code>mock.Setup…</code>, <code>mock.Verify…</code>). Support in <code>mock.Protected()</code> and for custom awaitable types may be added in the future. (<a href="https://github.com/stakx">@stakx</a>, <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1126">#1126</a>)</p> </li> </ul> <h4>Changed</h4> <ul> <li>Attempts to mark conditionals setup as verifiable are once again allowed; it turns out that forbidding it (as was done in <a href="https://github-redirect.dependabot.com/moq/moq4/issues/997">#997</a> for version 4.14.0) is in fact a regression. (<a href="https://github.com/stakx">@stakx</a>, <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1121">#1121</a>)</li> </ul> <h4>Fixed</h4> <ul> <li> <p>Performance regression: Adding setups to a mock becomes slower with each setup (<a href="https://github.com/CeesKaas">@CeesKaas</a>, <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1110">#1110</a>)</p> </li> <li> <p>Regression: <code>mock.Verify[All]</code> no longer marks invocations as verified if they were matched by conditional setups. (<a href="https://github.com/Lyra2108">@Lyra2108</a>, <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1114">#1114</a>)</p> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/moq/moq4/commit/74d58630f87b28e9bb7b3d810546473127a345de"><code>74d5863</code></a> Update version to 4.16.0</li> <li><a href="https://github.com/moq/moq4/commit/424fe31a534f44285789e22c38993332a8be7f51"><code>424fe31</code></a> Fix typo in changelog</li> <li><a href="https://github.com/moq/moq4/commit/f48c0f493b14a7efade2b2a2f1079f290ed78910"><code>f48c0f4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1126">#1126</a> from stakx/setup-task-result</li> <li><a href="https://github.com/moq/moq4/commit/6f6a89dd4d20446f62332de9013232f48b92be52"><code>6f6a89d</code></a> Update the changelog</li> <li><a href="https://github.com/moq/moq4/commit/66bcb21e5f09158ed0b6117c50c1181aa50ee089"><code>66bcb21</code></a> Enable <code>task.Result</code> in delegate-based setup methods</li> <li><a href="https://github.com/moq/moq4/commit/42521c47313d86b4d06c617e1bdcda22046fdcaa"><code>42521c4</code></a> Add ability in <code>IAwaitableFactory</code> to create result expression</li> <li><a href="https://github.com/moq/moq4/commit/187902c6d131a639bb089552566583327d1d0771"><code>187902c</code></a> Enable <code>task.Result</code> for expression-based setup methods</li> <li><a href="https://github.com/moq/moq4/commit/5802db8aa7ca35cabd148e96dcd7249d836a793a"><code>5802db8</code></a> Support faulted awaitables in <code>IAwaitableFactory</code></li> <li><a href="https://github.com/moq/moq4/commit/047bf9565a77ae4da63ff5331bd1e81d8a7d6a7c"><code>047bf95</code></a> Add tests for <code>task.Result</code> setups</li> <li><a href="https://github.com/moq/moq4/commit/bab305e3a6ee129d02bf920b99cfe0858a2acdf3"><code>bab305e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/moq/moq4/issues/1125">#1125</a> from stakx/awaitable-factories</li> <li>Additional commits viewable in <a href="https://github.com/moq/moq4/compare/v4.15.2...v4.16.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Moq&package-manager=nuget&previous-version=4.15.2&new-version=4.16.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:19:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10372