Skip to content

chore: Bump Imposter from 1.0.7 to 1.0.9 - #913

Merged
mergify[bot] merged 1 commit into
mainfrom
dependabot/nuget/Imposter-1.0.9
Oct 27, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
dependabot/nuget/Imposter-1.0.9

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 27, 2026

Copy link
Copy Markdown
Contributor

Updated Imposter from 1.0.7 to 1.0.9.

Release notes

Sourced from Imposter's releases.

1.0.9

Performance

  • Removing or inserting a registration no longer rebuilds the imposters after it (#​440, closes #​408). The driver compares registered targets by position, so removing or inserting one [assembly: GenerateImposter(...)] regenerated every imposter registered after it, even though none of them changed. The generator now reuses a source when its target and C# version haven't changed. In a project with 20 targets of 30 members each, removing the first registration now takes 4 ms in the generator, down from 477 ms. The generated code is unchanged.

  • Method Throws setups allocate one closure instead of two (#​441, closes #​437). The setup step wrapped the builder's throwing lambda in a second one. It now uses that lambda directly. Per setup:

    Setup 1.0.8 1.0.9
    Throws(exception) 472 B 384 B
    Throws(_ => exception) 472 B 384 B
    Throws<InvalidOperationException>() 384 B 296 B

    Throws<TException>() captures nothing, so its setup no longer allocates any closure.

1.0.8

Performance

  • Method setups no longer allocate queues or take a lock (#​438, closes #​405). Each method setup used to create two ConcurrentQueues, and each Then() step another. Until the steps ran out, every call also took a lock to advance them. Steps now live in a lock-free ReturnValueSequence, and callbacks in a list created on the first Callback. Indexer getter return values use the same sequence, as property getters already did. Per setup:

    Setup 1.0.7 1.0.8
    Returns(4) 1,949 B 389 B
    Returns(1).Then().Returns(2).Then().Returns(3) 3,864 B 720 B
    Throws(exception) 2,032 B 472 B
    Returns(4).Callback(...) 1,944 B 440 B
    indexer Getter().Returns(5) 1,208 B 480 B

    A call that runs a callback now allocates 96 B instead of 168 B, the same as a call without one.

  • Generic methods skip type adaptation when the type arguments already match (#​433, closes #​401). Verification no longer converts the criteria once per recorded call, so verifying against 1,000 recorded calls costs the same as against one. A matched Echo<string> call with two setups allocates at most 120 B, down from 216 B.

  • Edits rebuild less of each target's model (#​436, closes #​403). On every edit, the generator rebuilt or recompared several parts of each registered target's model. An edit with 20 registered targets now allocates about 25% less in the generator, for example 4.0 MB instead of 5.4 MB. The generated code is unchanged.

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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)

---
updated-dependencies:
- dependency-name: Imposter
  dependency-version: 1.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown

Test Results

    31 files  ±0      31 suites  ±0   53m 9s ⏱️ + 3m 1s
 4 529 tests ±0   4 529 ✅ ±0  0 💤 ±0  0 ❌ ±0 
28 808 runs  ±0  28 808 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2764440. ± Comparison against base commit 7560c9f.

This pull request removes 22 and adds 16 tests. Note that renamed tests count towards both.
 x-myHeader3: baz, True)
)
Mockolate.Internal.Tests.Internals.WildcardTests ‑ ShouldSupportMultilineStrings(
Mockolate.Internal.Tests.Internals.WildcardTests ‑ ShouldSupportMultilineStrings(
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(bool Equals(object obj);
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(bool Equals(object obj);
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
Mockolate.Tests.Web.ItExtensionsTests+IsHttpContentTests+WithHeadersTests ‑ ShouldVerifyStringHeaders(x-myHeader1 : foo
Mockolate.Tests.Web.ItExtensionsTests+IsHttpContentTests+WithHeadersTests ‑ ShouldVerifyStringHeaders(x-myHeader1 : foo
…
Mockolate.Internal.Tests.Internals.WildcardTests ‑ ShouldSupportMultilineStrings(
)
Mockolate.Internal.Tests.Internals.WildcardTests ‑ ShouldSupportMultilineStrings(
)
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(bool Equals(object obj);
int GetHashCode();, public override bool Equals(object obj), public override int GetHashCode())
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(bool Equals(object obj);
int GetHashCode();, public override bool Equals(object obj), public override int GetHashCode())
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
bool Equals(object obj);, public override string ToString(), public override bool Equals(object obj))
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
bool Equals(object? obj);
int GetHashCode();, public override string ToString(), public override int GetHashCode(), public override bool Equals(object? obj))
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
int GetHashCode();, public override string ToString(), public override int GetHashCode())
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
bool Equals(object obj);, public override string ToString(), public override bool Equals(object obj))
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
bool Equals(object? obj);
int GetHashCode();, public override string ToString(), public override int GetHashCode(), public override bool Equals(object? obj))
Mockolate.SourceGenerators.Tests.MethodSetupsTests ‑ WhenImplementingObjectMethods_ShouldUseSpecialInterfaces(string ToString();
int GetHashCode();, public override string ToString(), public override int GetHashCode())
…

@mergify
mergify Bot merged commit d1366ba into main Oct 27, 2026
19 checks passed
@mergify
mergify Bot deleted the dependabot/nuget/Imposter-1.0.9 branch October 27, 2026 22:16
@github-actions

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 9V74 2.87GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 389.1 ns 8.93 ns 8.35 ns 1.09 1.93 KB 1.00
Mockolate 1 356.8 ns 5.79 ns 5.14 ns 1.00 1976 B 1.00
Imposter 1 242.2 ns 1.10 ns 0.98 ns 0.68 928 B 0.47
TUnitMocks 1 496.4 ns 3.21 ns 2.84 ns 1.39 2088 B 1.06
Moq 1 136,490.1 ns 444.53 ns 394.07 ns 382.62 15098 B 7.64
NSubstitute 1 5,966.0 ns 30.69 ns 28.71 ns 16.72 9336 B 4.72
FakeItEasy 1 5,523.1 ns 53.31 ns 49.87 ns 15.48 8244 B 4.17
baseline* 10 661.8 ns 5.48 ns 4.86 ns 1.04 2.14 KB 1.00
Mockolate 10 634.9 ns 9.05 ns 8.46 ns 1.00 2192 B 1.00
Imposter 10 571.0 ns 4.14 ns 3.87 ns 0.90 1792 B 0.82
TUnitMocks 10 1,429.9 ns 5.05 ns 4.72 ns 2.25 3840 B 1.75
Moq 10 139,002.0 ns 451.55 ns 422.38 ns 218.96 19085 B 8.71
NSubstitute 10 8,702.3 ns 55.84 ns 49.50 ns 13.71 12361 B 5.64
FakeItEasy 10 8,587.2 ns 39.76 ns 31.04 ns 13.53 15786 B 7.20
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 7763 3.13GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

CreateMock Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 18.18 ns 0.490 ns 0.459 ns 1.08 160 B 1.00
Mockolate 16.77 ns 0.176 ns 0.156 ns 1.00 160 B 1.00
Imposter 111.24 ns 0.884 ns 0.827 ns 6.63 576 B 3.60
TUnitMocks 34.27 ns 0.142 ns 0.126 ns 2.04 216 B 1.35
Moq 1,358.95 ns 3.579 ns 2.988 ns 81.04 2096 B 13.10
NSubstitute 1,889.71 ns 7.564 ns 7.076 ns 112.69 5048 B 31.55
FakeItEasy 1,749.93 ns 12.195 ns 11.407 ns 104.35 2763 B 17.27
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
Intel Xeon 6973P-C 4.09GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v4

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Event Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 363.4 ns 5.51 ns 4.60 ns 1.27 1.7 KB 1.00
Mockolate 285.6 ns 5.67 ns 4.74 ns 1.00 1744 B 1.00
Imposter 160.7 ns 1.90 ns 1.58 ns 0.56 512 B 0.29
TUnitMocks 173.6 ns 8.21 ns 7.68 ns 0.61 1392 B 0.80
Moq 10,607.7 ns 254.60 ns 212.60 ns 37.15 12808 B 7.34
NSubstitute 4,051.6 ns 186.66 ns 165.47 ns 14.19 9264 B 5.31
FakeItEasy 106,019.1 ns 3,127.20 ns 2,772.18 ns 371.29 15729 B 9.02
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 7763 3.08GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Property N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 340.7 ns 6.24 ns 5.21 ns 0.66 2.41 KB 1.00
Mockolate 1 512.4 ns 18.16 ns 16.10 ns 1.00 2472 B 1.00
Imposter 1 212.5 ns 0.81 ns 0.71 ns 0.42 664 B 0.27
TUnitMocks 1 443.9 ns 2.28 ns 2.02 ns 0.87 1696 B 0.69
Moq 1 11,736.2 ns 70.19 ns 65.65 ns 22.92 10641 B 4.30
NSubstitute 1 7,552.4 ns 21.84 ns 20.43 ns 14.75 11720 B 4.74
FakeItEasy 1 8,293.2 ns 34.19 ns 30.30 ns 16.20 11508 B 4.66
baseline* 10 746.1 ns 11.70 ns 10.38 ns 0.74 2.91 KB 1.00
Mockolate 10 1,009.8 ns 6.91 ns 5.77 ns 1.00 2976 B 1.00
Imposter 10 382.2 ns 2.49 ns 2.33 ns 0.38 952 B 0.32
TUnitMocks 10 1,574.1 ns 18.51 ns 17.31 ns 1.56 4048 B 1.36
Moq 10 18,725.8 ns 107.78 ns 100.82 ns 18.55 18721 B 6.29
NSubstitute 10 17,364.9 ns 67.52 ns 59.85 ns 17.20 21585 B 7.25
FakeItEasy 10 19,746.6 ns 96.71 ns 90.46 ns 19.56 31546 B 10.60
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 7763 3.20GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Callback Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 307.9 ns 7.90 ns 7.39 ns 0.98 1.57 KB 1.00
Mockolate 315.7 ns 9.17 ns 8.57 ns 1.00 1608 B 1.00
Imposter 227.6 ns 2.78 ns 2.60 ns 0.72 744 B 0.46
TUnitMocks 510.9 ns 5.70 ns 4.76 ns 1.62 2064 B 1.28
Moq 98,519.7 ns 312.78 ns 277.27 ns 312.24 9096 B 5.66
NSubstitute 4,732.7 ns 46.35 ns 43.36 ns 15.00 7896 B 4.91
FakeItEasy 4,818.6 ns 60.77 ns 56.84 ns 15.27 6970 B 4.33
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.14 (10.0.14, 10.0.1426.52326), X64 RyuJIT x86-64-v4

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Indexer N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 997.3 ns 48.20 ns 45.08 ns 1.35 3.77 KB 1.00
Mockolate 1 741.1 ns 6.45 ns 6.03 ns 1.00 3.77 KB 1.00
Imposter 1 297.3 ns 4.49 ns 3.98 ns 0.40 1.19 KB 0.32
Moq 1 133,790.9 ns 880.06 ns 823.21 ns 180.54 20.39 KB 5.41
NSubstitute 1 7,422.3 ns 124.27 ns 116.24 ns 10.02 12.78 KB 3.39
FakeItEasy 1 7,722.0 ns 70.90 ns 62.85 ns 10.42 13.63 KB 3.62
baseline* 10 2,619.3 ns 16.18 ns 15.13 ns 1.32 4.82 KB 1.00
Mockolate 10 1,977.4 ns 51.88 ns 48.52 ns 1.00 4.82 KB 1.00
Imposter 10 748.2 ns 11.77 ns 11.01 ns 0.38 2.24 KB 0.47
Moq 10 141,384.3 ns 591.21 ns 553.02 ns 71.54 29.89 KB 6.20
NSubstitute 10 18,009.2 ns 106.20 ns 99.34 ns 9.11 25.58 KB 5.31
FakeItEasy 10 16,614.4 ns 250.97 ns 234.76 ns 8.41 32.97 KB 6.84

baseline* rows show the corresponding Mockolate benchmark from the most recent successful main branch build with results, for regression comparison.

@github-actions

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

Mockolate

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

Coverage Thresholds: high:80 low:60 break:0

github-actions Bot added a commit that referenced this pull request Oct 27, 2026
github-actions Bot added a commit that referenced this pull request Oct 27, 2026
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.

0 participants