Repository navigation
What's Changed
🚀 New features
- feat: report a type that is mocked in spellings that differ only in tuple names or nullability by @vbreuss in #1052
🐞 Bug fixes
- fix: count the calls of an HttpClient separately from those of its handler by @vbreuss in #1023
- fix: suppress CS0659 for mocks that override only
Equals(object)by @vbreuss in #1024 - fix: compile mocks of generic methods that use
T?with a constrained type parameter by @vbreuss in #1028 - fix: verify an omitted optional parameter against its declared default in classic mode by @vbreuss in #1027
- fix: describe any parameters in the failure message after
AnyParameters()by @vbreuss in #1029 - fix: emit the default constraint on overrides of unconstrained generic methods by @vbreuss in #1025
- fix: use a matcher passed to
Seton anobjectproperty or indexer as a matcher by @vbreuss in #1030 - fix: mock generic types that are closed over dynamic by @vbreuss in #1026
- fix: match the whole array with an array matcher on a
params object[]parameter by @vbreuss in #1031 - fix: resolve a null literal on classic delegate setups and verifications by @vbreuss in #1032
- fix: emit
defaultfor a defaulted parameter of a type parameter type by @vbreuss in #1051 - fix: compile mocks of generic methods constrained to a type argument closed over a sealed class, struct or array by @vbreuss in #1053
- test: update generator snapshots for the null-argument failure message by @vbreuss in #1056
📖 Documentation
- docs: order the benchmark tabs from creating a mock to configured members by @vbreuss in #1049
- ci: show the benchmark environment after the results in the PR comment by @vbreuss in #1055
- test: make the Complete benchmark more realistic and add async and sequence benchmarks by @vbreuss in #1057
🧰 Maintenance
- ci: wait up to 60 minutes for the NuGet listing before notifying the docs site by @vbreuss in #992
- test: update aweXpect to 4.2.0 and open a diff tool for failing snapshots by @vbreuss in #993
- test: call each member several times in the complete workflow benchmark by @vbreuss in #996
- test: benchmark members that are called 1000 times by @vbreuss in #994
- perf: record each call as a node of a lock-free linked list by @vbreuss in #995
- test: benchmark indexers on TUnit.Mocks by @vbreuss in #997
- chore: Bump the tunit group with 2 updates by @dependabot[bot] in #998
- chore: Bump the awexpect group with 2 updates by @dependabot[bot] in #999
- chore: Bump Microsoft.Bcl.AsyncInterfaces from 10.0.14 to 11.0.0 by @dependabot[bot] in #1000
- chore: Bump NuGet.Frameworks from 7.9.0 to 8.0.0 by @dependabot[bot] in #1002
- chore: Bump Microsoft.Testing.Extensions.TrxReport from 2.5.2 to 2.5.3 by @dependabot[bot] in #1001
- test: benchmark a mock that is used without any setup by @vbreuss in #1003
- perf: store a plain return value on the method setup instead of in a callback list by @vbreuss in #1004
- perf: check count terminators as a range instead of through a capturing predicate by @vbreuss in #1005
- perf: skip collecting the arguments when the default value does not need them by @vbreuss in #1006
- perf: read and write properties without generic virtual calls by @vbreuss in #1007
- perf: shrink every recorded call by eight bytes by @vbreuss in #1008
- perf: access indexers without generic virtual calls and without an access object by @vbreuss in #1010
- perf: store a plain return value on the indexer setup instead of in a callback list by @vbreuss in #1011
- perf: record all calls of a mock in one list by @vbreuss in #1012
- refactor: remove the recording API that only tests still use by @vbreuss in #1014
- refactor: use the record view directly instead of an interface by @vbreuss in #1015
- refactor: collect the interactions of a member in order instead of sorting them by @vbreuss in #1016
- refactor: mark all records of a member as verified in one place by @vbreuss in #1017
- refactor: expose the position of a record with the type it is stored in by @vbreuss in #1019
- refactor: name the record views after what they are by @vbreuss in #1020
- perf: record combined mocks through the typed path by @vbreuss in #1021
- perf: verify a member that was never called from its empty typed view by @vbreuss in #1022
- ci: compare the benchmarks of a pull request with main from the same runner by @vbreuss in #1050
- fix: print a null argument as null in classic-mode failure messages and test classic mode again by @vbreuss in #1054
- test: update the remaining expectations for the null-argument failure message by @vbreuss in #1058
- perf: skip the fallback setup lookup when there is nothing to fall back to by @vbreuss in #1059
- perf: create the default task of a result without a parameter array by @vbreuss in #1060
- perf: create the default task without a result inline by @vbreuss in #1061
Full Changelog: v4.1.1...v4.2.0