Pretender 0.1.1-prerelease
This is a prerelease version of Pretender.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Pretender --version 0.1.1-prerelease
NuGet\Install-Package Pretender -Version 0.1.1-prerelease
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pretender" Version="0.1.1-prerelease" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pretender --version 0.1.1-prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Pretender, 0.1.1-prerelease"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pretender as a Cake Addin #addin nuget:?package=Pretender&version=0.1.1-prerelease&prerelease // Install Pretender as a Cake Tool #tool nuget:?package=Pretender&version=0.1.1-prerelease&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Pretender
Benchmarks vs Competitors
Doing a simple
Is.IsAny<string>()
or equivalent call.
Method | Mean | Error | StdDev | Median | Gen0 | Gen1 | Allocated |
---|---|---|---|---|---|---|---|
MoqTest | 46,155.49 ns | 919.804 ns | 1,999.579 ns | 45,122.63 ns | 1.3428 | 1.2207 | 8850 B |
NSubstituteTest | 4,011.88 ns | 76.549 ns | 85.084 ns | 4,004.60 ns | 1.2360 | 0.0381 | 7760 B |
PretenderTest | 31.41 ns | 0.683 ns | 1.231 ns | 30.86 ns | 0.0268 | - | 168 B |
0.1.0
- Intercept
.Create
calls - Base implementation name off of
ITypeSymbol
derived info - Async/Task Support
- Benchmark vs NSub & Moq
- Property Support
- Compiled Setup calls
- Intercept Setup calls
- Support Base MatcherAttribute
- Special case AnyMatcher
- Multiple uses of single type
- Classes
- Constructor support
- out parameters
- Make our own delegate for matcher calls
- Maybe not even use expressions in Setup
- Use
Span<object?>
forCallInfo
arguments - Multiple method overloads
0.2.0
- Check how many times a call has been made
- Take constructor args in
.Create()
call - Respect
[Pretend]
attribute that is placed on a partial class - A lot more benchmarks
- Property setter
- Static Abstract (not support but we should fake an implementation)
- More matchers
- Probably need a static matcher register 😦
- Support Matcher arguments and fallback if impossible
- Obsolete public types that exist only for SourceGen
- And move to Pretender.Internals namespace
- pragma disable obsolete warnings
- More Behaviors
- Use CancellationToken everywhere
0.3.0
- Special case known good fake implementation over mocking
- EphemeralDataProtectionProvider
- TimeProvider
- Make Pretend Implementation castable to something you can get the Pretend out of
Future Ideas
- What can I do with things that are
protected
orsealed
- Analyze all the things
- Custom awaitable (honestly don't think I care)
- Analyze constructor args them for likely match
- Debugger story
- We do people want to step into
- What objects will they inspect and how can it be helpful
- Documentation
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.6-prerelease | 37 | 11/2/2024 |
0.1.5-prerelease | 100 | 4/22/2024 |
0.1.4-prerelease | 134 | 12/24/2023 |
0.1.3-prerelease | 111 | 11/19/2023 |
0.1.2-prerelease | 83 | 9/24/2023 |
0.1.1-prerelease | 75 | 9/24/2023 |
0.1.0-prerelease | 74 | 9/24/2023 |
0.0.2-prerelease | 100 | 8/20/2023 |
0.0.1-prerelease | 82 | 8/19/2023 |