Skip to content

chore: Bump Imposter from 0.2.23 to 1.0.1 - #897

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/Imposter-1.0.1
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/Imposter-1.0.1

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

Updated Imposter from 0.2.23 to 1.0.1.

Release notes

Sourced from Imposter's releases.

1.0.1

Fixes

  • Release notes on nuget.org no longer show markdown escape backslashes (#​395, closes #​393). The notes went through a converter that escaped every character that could start markdown, so code such as Arg<int>.Is(5), _ => { } and $GITHUB_OUTPUT reached the package as Arg\<int>, \_ => and $GITHUB\_OUTPUT. A small script in the repository now drops only the markup the notes use, and the package smoke test checks the converted text on every pull request.

No change to the generator or the runtime API.

1.0.0

Imposter 1.0.0 is the first stable release. The package is the same single Imposter package as the 0.2.x line, with the generator and the Imposter.Abstractions runtime inside, and 0.2.27 upgrades to it without code changes.

What 1.0.0 commits to

  • The public API of Imposter.Abstractions: the GenerateImposter attribute, Arg and the span and out matchers, Count, ImposterMode, IHaveImposterInstance<T> with Instance(), and the two exceptions. See the Key API Reference.
  • The fluent setup, verification and event API that generated imposters expose, as documented for methods, properties, indexers and events.
  • The generator runs on Roslyn 4.0 through 5.0 and emits code for C# 8 through C# 14; every release is tested against all four compiler baselines.

TypeCaster, SpanElementsComparer<T> and SetupCollection<T> are public because generated imposters call them, but they are hidden from IntelliSense and may change with the generator in the same package.

Changes since 0.2.27

  • Generated-code helpers are hidden from IntelliSense (#​392, closes #​389). TypeCaster and SpanElementsComparer<T> carry EditorBrowsable(Never) like SetupCollection<T>; the Key API Reference gains an "Imposter Instance" section for IHaveImposterInstance<T> and Instance().
  • The generated _lastestInvocationImposter field is now spelled _latestInvocationImposter (#​394, closes #​390). The field is private to the generated class, so nothing changes for callers.

0.2.27

Maintenance

  • The publish workflow passes the release body straight to the markdown converter (#​391, closes #​388). The copy through $GITHUB_OUTPUT with a fixed EOF delimiter is gone, so a release body that contains a line of exactly EOF can no longer truncate the notes or fail the job. With #​387, this is the first release whose notes reach the package through the file-based path, and it exercises that path end to end. No change to the generator or the runtime API.

0.2.26

Fixes

  • Setups that aren't configured yet no longer hide configured ones (#​383, closes #​381). A method setup took part in matching as soon as its arguments were given, before Returns, Throws or Callback configured it. Until then, a matching call returned the default value or threw MissingImposterException, even when an older setup had an outcome. That could happen in three ways:

    • another thread called while a setup was being added;
    • verifying with narrower arguments created a setup, as in imposter.Get(Arg<int>.Is(5)).Called(Count.Once()), which made later Get(5) calls lose an earlier Returns;
    • a call went through a setup before its first outcome was configured, and that configuration was then lost.

    A call now uses the newest matching setup that has an outcome. A setup without one is used only when nothing configured matches, so a bare void setup still allows its call in explicit mode. Behaviour change: a newer bare setup no longer overrides an older Throws or Callback for the same arguments. To make such a case do nothing, give its setup an empty callback: .Callback(_ => { }).

Maintenance

  • Debug builds of the generator no longer warn about an unused using (#​385, closes #​384). No behaviour change.

0.2.25

Performance

  • Calls no longer allocate to find their setup (#​376, closes #​371). Looking up the matching setup used to enumerate a concurrent stack, which allocated on every call. Setups now live in a SetupCollection<T> that's enumerated without allocating, and the newest matching setup still wins. Bytes per call:

    Call Before After
    method 144 B 96 B
    void method 136 B 88 B
    indexer getter 104 B 56 B
    generic method (1 / 8 setups) 312 / 984 B 168 / 504 B

    SetupCollection<T> is a new public type in Imposter.Abstractions, for generated code only. It's hidden from IntelliSense.

  • Less generator work on every edit (#​377, closes #​370). The generator now chooses each type parameter's generated name once per symbol. It writes types with no renamed type parameter directly. This drops the allocations of the incremental run after an edit by 20% for plain targets and by half for generic ones, and the generated code is unchanged.

Maintenance

  • The README and the docs show a benchmark table that a new workflow regenerates on a GitHub-hosted runner after every change to master (#​380, closes #​379). The docs page no longer labels Moq's results as Imposter's.
  • A generator benchmark (benchmarks/Imposter.GeneratorBenchmarks) measures cold and incremental runs (#​377, #​382, closes #​374).

0.2.24

Fixes

  • Type parameters named await, file, required, scoped or extension (#​378, closes #​369). A target or method type parameter with one of these names made the imposter fail to compile:

    • file and required from C# 11, read as modifiers;
    • extension from C# 14, read as an extension block;
    • scoped from C# 11;
    • await in async methods.

    A type parameter named like any contextual keyword your compiler knows now takes another name in generated code, as var, _, record and partial already did. That covers keywords later compilers add, such as the C# 15 preview's closed and union. You still write the imposter and its setups with your own type arguments, and dedicated namespaces keep the original names.

  • Method type parameters named like members of their generated types (#​373, closes #​349). A generic method whose type parameter was named Invoke, Returns, Matches, As, Callback, Then, Result or another member of the types generated for it failed with CS0102. Such a type parameter now takes another name in generated code; your setups don't change.

Maintenance

  • Regression tests for inherited generic methods whose type parameter is named like the target's (#​368, closes #​350); the fix itself shipped in 0.2.23 with #​362. The generator also lost an unused helper (#​375, closes #​372). The generated imposters behave the same.

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.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

dependabot Bot commented on behalf of github Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #902.

@dependabot dependabot Bot closed this Oct 18, 2026
@dependabot
dependabot Bot deleted the dependabot/nuget/Imposter-1.0.1 branch October 18, 2026 16:17
@github-actions

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), 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 402.0 ns 16.89 ns 14.97 ns 1.16 1.93 KB 1.00
Mockolate 1 347.3 ns 4.19 ns 3.50 ns 1.00 1.93 KB 1.00
Imposter 1 547.2 ns 6.77 ns 6.01 ns 1.58 3.99 KB 2.07
TUnitMocks 1 478.9 ns 4.27 ns 3.99 ns 1.38 2.02 KB 1.05
Moq 1 182,660.2 ns 519.90 ns 405.91 ns 526.06 14.58 KB 7.55
NSubstitute 1 6,417.0 ns 79.19 ns 74.07 ns 18.48 9.12 KB 4.72
FakeItEasy 1 6,081.0 ns 41.04 ns 36.38 ns 17.51 8.05 KB 4.17
baseline* 10 704.6 ns 17.06 ns 15.96 ns 1.09 2.14 KB 1.00
Mockolate 10 649.2 ns 8.57 ns 8.01 ns 1.00 2.14 KB 1.00
Imposter 10 914.1 ns 24.58 ns 20.53 ns 1.41 4.84 KB 2.26
TUnitMocks 10 1,364.2 ns 14.11 ns 13.20 ns 2.10 3.73 KB 1.74
Moq 10 188,282.1 ns 998.24 ns 933.75 ns 290.06 18.48 KB 8.63
NSubstitute 10 9,601.2 ns 52.95 ns 49.53 ns 14.79 12.07 KB 5.64
FakeItEasy 10 9,715.6 ns 154.40 ns 144.42 ns 14.97 15.42 KB 7.20
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 3.17GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

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

Event Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 290.3 ns 11.71 ns 10.96 ns 0.94 1.7 KB 1.00
Mockolate 307.7 ns 11.48 ns 10.74 ns 1.00 1.7 KB 1.00
Imposter 892.1 ns 30.63 ns 27.16 ns 2.90 7.18 KB 4.22
TUnitMocks 193.1 ns 6.49 ns 6.07 ns 0.63 1.34 KB 0.79
Moq 15,682.8 ns 68.66 ns 64.22 ns 51.03 12.51 KB 7.35
NSubstitute 6,019.9 ns 68.22 ns 63.81 ns 19.59 9.05 KB 5.31
FakeItEasy 216,036.8 ns 2,461.00 ns 2,181.61 ns 703.00 15.26 KB 8.96
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v4

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

Callback Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 309.4 ns 7.72 ns 7.22 ns 1.25 1.57 KB 1.00
Mockolate 248.1 ns 6.40 ns 5.67 ns 1.00 1.57 KB 1.00
Imposter 332.0 ns 2.82 ns 2.50 ns 1.34 2.34 KB 1.49
TUnitMocks 409.0 ns 5.90 ns 4.93 ns 1.65 2 KB 1.27
Moq 57,827.9 ns 227.39 ns 201.58 ns 233.16 8.88 KB 5.66
NSubstitute 3,611.1 ns 42.90 ns 38.03 ns 14.56 7.71 KB 4.91
FakeItEasy 3,614.0 ns 67.51 ns 63.15 ns 14.57 6.81 KB 4.33
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

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

Indexer N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 999.5 ns 32.64 ns 27.25 ns 1.01 3.77 KB 1.00
Mockolate 1 991.5 ns 22.22 ns 17.35 ns 1.00 3.77 KB 1.00
Imposter 1 809.6 ns 8.89 ns 7.42 ns 0.82 4.95 KB 1.32
Moq 1 219,908.5 ns 857.94 ns 760.55 ns 221.86 20.37 KB 5.41
NSubstitute 1 10,681.6 ns 30.15 ns 28.20 ns 10.78 12.78 KB 3.39
FakeItEasy 1 12,586.2 ns 77.63 ns 72.62 ns 12.70 13.63 KB 3.62
baseline* 10 2,472.3 ns 27.65 ns 25.86 ns 0.94 4.82 KB 1.00
Mockolate 10 2,625.8 ns 23.59 ns 22.07 ns 1.00 4.82 KB 1.00
Imposter 10 1,484.0 ns 71.32 ns 66.71 ns 0.57 6.01 KB 1.25
Moq 10 232,197.1 ns 1,246.71 ns 1,166.17 ns 88.44 29.89 KB 6.20
NSubstitute 10 25,176.7 ns 211.19 ns 197.54 ns 9.59 25.58 KB 5.31
FakeItEasy 10 25,409.5 ns 169.50 ns 141.54 ns 9.68 32.97 KB 6.84
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V45 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v4

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

CreateMock Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 20.55 ns 1.009 ns 0.944 ns 1.93 160 B 1.00
Mockolate 10.64 ns 0.498 ns 0.466 ns 1.00 160 B 1.00
Imposter 156.93 ns 4.248 ns 3.974 ns 14.78 2240 B 14.00
TUnitMocks 21.43 ns 0.520 ns 0.461 ns 2.02 200 B 1.25
Moq 821.26 ns 15.338 ns 13.597 ns 77.33 2096 B 13.10
NSubstitute 1,087.45 ns 32.899 ns 30.773 ns 102.40 5048 B 31.55
FakeItEasy 1,088.04 ns 26.972 ns 25.229 ns 102.45 2763 B 17.27
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
INTEL XEON PLATINUM 8573C 2.30GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v4

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

Property N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 492.0 ns 13.95 ns 13.05 ns 0.91 2.41 KB 1.00
Mockolate 1 541.3 ns 31.47 ns 29.44 ns 1.00 2.41 KB 1.00
Imposter 1 320.9 ns 7.10 ns 6.64 ns 0.59 2.98 KB 1.23
TUnitMocks 1 459.3 ns 10.90 ns 10.20 ns 0.85 1.64 KB 0.68
Moq 1 8,884.5 ns 76.34 ns 67.67 ns 16.46 10.39 KB 4.30
NSubstitute 1 5,826.0 ns 170.08 ns 159.09 ns 10.79 11.45 KB 4.74
FakeItEasy 1 5,230.7 ns 114.85 ns 101.81 ns 9.69 11.23 KB 4.65
baseline* 10 988.6 ns 12.13 ns 11.34 ns 0.85 2.91 KB 1.00
Mockolate 10 1,156.4 ns 30.46 ns 27.00 ns 1.00 2.91 KB 1.00
Imposter 10 557.6 ns 19.23 ns 17.99 ns 0.48 3.26 KB 1.12
TUnitMocks 10 1,773.1 ns 43.52 ns 40.71 ns 1.53 3.94 KB 1.35
Moq 10 13,987.4 ns 382.76 ns 358.03 ns 12.10 18.28 KB 6.29
NSubstitute 10 13,643.9 ns 266.93 ns 249.69 ns 11.80 21.08 KB 7.25
FakeItEasy 10 14,452.0 ns 223.79 ns 209.33 ns 12.50 30.8 KB 10.60

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

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