Releases: FakeItEasy/FakeItEasy
Releases · FakeItEasy/FakeItEasy
8.3.0
New
- Faking delegates now about 25 times faster due to DynamicProxy's
CreateDelegateToMixin
(#2013) - Build and test on macOS (#2029)
Fixed
- Adding null-valued EventHandlers to a fake leads to
ArgumentNullException
(#2033)
Additional Items
- Fix one aspect of Linux build - make build.ps1 executable on Linux (#2017)
- Fix docs preview workflow (#2001, #2003, #2004)
- Improve docs preview workflow (#2006, #2008)
- Bump docs generation dependencies (#2005, #2025, #2032)
- Update docs to
- use new URL in link to Moq (#2021)
- note that faking of generic types with methods that have
in
parameters works on .NET 6 and higher (#1382) - stress that methods must be fully configured to capture arguments (#2011)
- indicate how to use
A.CallTo
with methods whose arguments include anonymous types (#1593) - document how to use
InternalsVisibleTo
from project files (#2027) - fix broken links (#2023)
- Check generated documentation for dead links (#2024)
- Update how to build instructions to correct mistakes and streamline (#2016)
- Use .NET 5.0 source generators to generate strongly-typed overloads (#1804)
With special thanks for contributions to this release from:
- Jonathon Rossi - @jonorossi
- Dominique Schuppli - @stakx
- Stephen Friend - @StephenFriend
8.2.0
New
Fake.Reset
replacesFake.ClearConfiguration
as the preferred mechanism to clear existing fakes' configuration. (#1839)
Resets all changes made to the fake after it was created.- net8.0 target framework assembly (#1996)
Fixed
- Creation failure message may indicate that the to-be-faked type has no applicable constructor when it really does (#1929)
Additional Items
- Stop resigning FakeItEasy.Tests.TestHelpers.FSharp once the SDK starts signing it properly (#1930)
- Share
EventRule
between Fakes (#1993) - Update Github actions to quell build warnings (#1995)
- Bump documentation-building dependencies (#1985)
- Bump FakeItEasy.Tools to support release process (#1998, #1999)
- Bump dawidd6/action-download-artifact to quell Node.js version warning (#1999)
8.1.0
Changed
New
- Provide a mechanism for capturing arguments passed to Fakes (#1950):
var capturedMessage = A.Captured<string>(); var logger = A.Fake<IListLogger>(); A.CallTo(() => logger.Log(capturedMessage._, An<IEnumerable<int>>._)).DoesNothing(); var calculator = new Calculator(logger); calculator.Add([1, 2, 3, 4]); calculator.Square(7); capturedMessage.Values.Should().Equal("about to add", "about to square");
Fixed
- Argument matchers trigger even if the rule they're part of has already fired the maximum number of times (#1975)
Additional Items
- Upgrade StyleCop (#1979)
- Suppress NU1902,NU1903 in tests, recipes (#1981)
- Include README in NuGet package (#1980)
With special thanks for contributions to this release from:
- Søren Palmund - @Miista
8.0.1
Fixed
DoesNothing
and implicit creation options throwsArgumentException
(#1976)
Additional Items
With special thanks for contributions to this release from:
- Alexander Kastler - @Spacelord-XaN
8.0.0
Changed
-
Upgrade Castle.Core to 5.1.1 (#1925)
-
Match enumerable arguments by comparing contents rather than via Equals (#1960)
This is technically a breaking change, but it's pretty unlikely that anyone was relying on the old behavior. Only if someone were passing an enumerable to a call specification and either
- relying on the reference equality to fail, or
- the argument's type has overridden Equals with an implementation that does not compare the sequence item-by-item as we propose to do
would it be an unwelcome surprise.
Removed
- net5.0 target framework assembly (#1936)
New
- net6.0 target framework assembly (#1936)
- Registry of argument comparers (#1952, #1961)
Discoverable argument comparers can be implemented by deriving fromArgumentEqualityComparer<T>
or implementingIArgumentEqualityComparer
. Learn more at Custom Argument Equality. - Match enumerable arguments by comparing contents rather than via Equals (#1960)
Fixed
- Failure to create fake via constructor with
in
parameter (#1948) - Nesting or compounding An-built constraints throws wrong exception (#1966)
Additional Items
- Publish target framework Support Policy (#1935)
- Escape HTML tags in Formatting Argument Values docs (#1955)
- Fix broken link in documentation (#1956)
- Various docs-generating dependency updates, suggested by dependabot for security (#1945, #1954, #1959, #1971)
- Wrong account making "This change has been released" notes on issues (#1933)
- Cause "👀 publish-docs-preview" label to publish docs preview for a pull request (#1939, #1941, #1942, #1943)
- Install .NET Core 3.1 on Windows in CI (#1954)
With special thanks for contributions to this release from:
- first-time contributor Viktor Hofer - @ViktorHofer (#1925)
- @mriehm
8.0.0-alpha.1
Changed
Upgrade Castle.Core to 5.1.1 (#1925)
With special thanks for contributions to this release from:
- first-time contributor Viktor Hofer - @ViktorHofer (#1925)
7.4.0
New
- Ensure anonymous parameters are handled and displayed correctly in all cases (#1928)
Fixed
NullReferenceException
thrown when attempting to build unmet expectation message that includes an anonymous parameter (#1920)ArgumentCollection.ArgumentNames
has typeIEnumerable<string>
but may contain nulls (#1922)- Provide placeholder names for anonymous parameters in received call description (#1924)
Additional Items
- Fix typo in Assertions documentation:
MustHaveHappend
→MustHaveHappened
(#1904) - Migrate documentation from Read the Docs to the FakeItEasy website.
The documentation is built using Material for Mkdocs and versions are maintained by mike:- Upgrade mkdocs to 1.3.0 (#1877)
- Build docs on each pull request (#1878)
- Update the "Analyzers" article to redirect to the moved analyzers docs (#1886)
- Build docs with Material for MkDocs and mike (#1896)
- Fix link in README to point to the new docs and remove readthedocs.yml (#1899)
- Lock down python requirements (#1908)
- Upgrade mkdocs-material to 9.1.3 (#1916)
- Add Faking HttpClient recipe (#1915, #1918)
- Replace examples projects with documentation or recipes (#1917)
- Test against .NET 6.0 (#1876, #1914)
- Use GitHub Actions for CI (#1892, #1909, #1911)
- Fix pack build target to support spaces in path (#1895)
- Replace ApprovalTests with Verify (#1891)
- Explain default argument formatting before how to customize (#1902)
- Improve in-article tables of contents (#1907)
With special thanks for contributions to this release from:
- 🥇 Andrei Chasovskikh - @andreycha (#1904)
- 🥇 Kai - @kaeedo (#1920)
Full Changelog
7.3.1
Fixed
CallsWrappedMethod
doesn't add a call rule, so will not override Strict configuration (#1870)
Additional Items
Full Changelog: 7.3.0...7.3.1
7.3.0
New
- Indicate Fake name (if defined) in failing assertions (#1837)
Additional Items
- Fix warnings introduced by .NET 6.0 SDK and use latest AppVeyor images (#1860)
- Use CallerArgumentExpression in Guard.AgainstNull (#1861)
- Bump mkdocs from 1.0.4 to 1.2.3 in /docs (#1863)
- Remove ExpressionCallMatcherTests (#1865)
- Add sample usage to README (#1862)
With special thanks for contributions to this release from:
- PiotrKlecha - @PiotrKlecha
- Dependabot - @dependabot
7.2.0
New
- Improve speed of Object method comparisons when applying default Fake rules (#1848)
Fixed
- Overridden Equals on wrapping Fake causes call to be forwarded to wrapped object (#1849)
- StrictFakeOptions.Allow* do not apply to overridden Object methods (#1850)
Additional Items
- Update @afakebot's personal authentication token on AppVeyor (#1846)
- Fix minor typo in StrictFakeOptions.AllowEvents API docs (#1851)
- Clarify use of WithArgumentsForConstructor expression (#1855)
With special thanks for contributions to this release from:
- Tim Lovell-Smith - @TimLovellSmith