Skip to content

Releases: FakeItEasy/FakeItEasy

5.1.0

11 Feb 12:02
1f7c69c
Compare
Choose a tag to compare

New

  • Support for naming fakes (#1488)
  • Have ReturnsNextFromSequence guard against null values (#1572)

Fixed

  • Concurrent calls and (implicit or explicit) configuration changes to Fakes are not threadsafe (#1569)

Additional Items

  • Replace readthedocs GitHub service integration with webhook (#1565)
  • Upgrade ILMerge to 3.0.21 (#1567)
  • Upgrade SimpleExec to 5.0.0-beta.1 (#1570)
  • Upgrade Minver to 1.0.0-beta.4 (#1574)

With special thanks for contributions to this release from:

5.0.1

14 Jan 11:20
b218f28
Compare
Choose a tag to compare

Fixed

  • Raising internal events silently fails (#1560)

Additional Items

  • Switch from licenseUrl to license in NuGet package metadata (#1556)
  • Remove defunct .gitignore entries (#1558)
  • Filter out all release issues from milestone when preparing release (#1559)

With special thanks for contributions to this release from:

5.0.0

07 Jan 12:59
26ce84b
Compare
Choose a tag to compare

New

  • Greatly reduced time to create, configure, call, and assert on Fakes (#1466, #1469, #1470, #1489, #1493, #1507)
  • Warn at configuration time that delegates can't call a base method (#1492)

Changed

  • No longer passing IFakeObjectCallRule to IInterceptionListener.OnAfterCallIntercepted (#1494, #1521)
  • Restrict typeparams in generic Fake creation methods to reference types, and free-form delegates to Delegate types (#1465)
  • Renamed IRepeatConfiguration type used in fluent API to IBehaviorLifetimeConfiguration (#1294)
  • Can only fake delegates accessible to DynamicProxy (#1508)
  • Fakes, and custom exceptions thrown by the library, are no longer binary serializable (#1500)

Removed from the public API

  • Automatic fake injection into system under test (InitializeFixture) (#992)
  • IInterceptedFakeObjectCall.AsReadOnly (#1505)
  • Raise.With<TEventHandler> (#1152)
    Use Raise.FreeForm.With (or Raise.FreeForm(Of TEventHandler).With for VB) instead.
  • Analyzer meta-package FakeItEasy.Analyzer (#1509)
    Use FakeItEasy.Analyzer.CSharp or FakeItEasy.Analyzer.VisualBasic instead

Deprecated

  • Specifying call count constraints using Repeated (#1295)
    Use one of the following formats instead:
    A.CallTo(() => foo.Bar()).MustHaveHappened();
    A.CallTo(() => foo.Bar()).MustNotHaveHappened();
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceExactly();
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrMore();
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrLess();
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceExactly();
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrMore();
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrLess();
    
    A.CallTo(() => foo.Bar()).MustHaveHappened(4, Times.Exactly);
    A.CallTo(() => foo.Bar()).MustHaveHappened(6, Times.OrMore);
    A.CallTo(() => foo.Bar()).MustHaveHappened(7, Times.OrLess);
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedANumberOfTimesMatching(n => n % 2 == 0);

Additional Items

  • Drop GitFlow in favour of GitHub flow (#1487)
  • Small improvements to prepare_release command (#1538, #1539, #1540)
  • Correct documentation on return value when Invokes is used (#1552, #1553)
  • Very explicitly state how to invoke custom calls for methods that take more than 4 arguments (#1496)
  • Document advanced usage methods (#1474)
  • Simplify ServiceLocator (#1478)
  • Move most proxy generator tests to specs (#1495)
  • Characterize/figure out serialization support (#1499)
  • Upgrade Bullseye to 2.3.0-beta.6 (#1464, #1471, #1524, #1528, #1531, #1534)
  • Upgrade Xbehave.Core to 2.4.0 (#1480)
  • Upgrade SimpleExec to 4.2.0 (#1502, #1531)
  • Upgrade Microsoft.NET.Test.Sdk to 15.9.0 (#1482)
  • Use MinVer to generate version numbers (#1516)
  • Refactored build script (#1520, #1523)
  • Show messages only (no stack trace) for exceptions during build (#1529)
  • Remove MonoDevelop section from sln (#1533)
  • Remove obsolete branches from the repository (#1535)

With special thanks for contributions to this release from:

5.0.0-beta.1

18 Dec 14:31
c0a4099
Compare
Choose a tag to compare
5.0.0-beta.1 Pre-release
Pre-release

Fixed

  • Exceptions thrown by Invokes callbacks are wrapped in UserCallbackException (#1543, #1547)
  • Array creation within fake call configuration fails due to type mismatch (#1548)

Additional Items

  • Drop GitFlow in favour of GitHub flow (#1487)
  • Small improvements to prepare_release command (#1538, #1539, #1540)

With special thanks for contributions to this release from:

4.9.2

13 Dec 17:12
8a3aafc
Compare
Choose a tag to compare

Fixed

  • Stop wrapping exceptions thrown by Invokes callbacks (#1543)

With special thanks for contributions to this release from:

5.0.0-alpha.1

10 Dec 12:14
5a72a1e
Compare
Choose a tag to compare
5.0.0-alpha.1 Pre-release
Pre-release

Changed

  • No longer passing IFakeObjectCallRule to IInterceptionListener.OnAfterCallIntercepted (#1494, #1521)
  • Restrict typeparams in generic Fake creation methods to reference types, and free-form delegates to Delegate types (#1465)
  • Renamed IRepeatConfiguration type used in fluent API to IBehaviorLifetimeConfiguration (#1294)
  • Can only fake delegates accessible to DynamicProxy (#1508)
  • Fakes, and custom exceptions thrown by the library, are no longer binary serializable (#1500)

Removed from the public API

  • Automatic fake injection into system under test (InitializeFixture) (#992)
  • IInterceptedFakeObjectCall.AsReadOnly (#1505)
  • Raise.With<TEventHandler> (#1152)
    Use Raise.FreeForm.With (or Raise.FreeForm(Of TEventHandler).With for VB) instead.
  • Analyzer meta-package FakeItEasy.Analyzer (#1509)
    Use FakeItEasy.Analyzer.CSharp or FakeItEasy.Analyzer.VisualBasic instead

Deprecated

  • Specifying call count constraints using Repeated (#1295)
    Use one of the following formats instead:
    A.CallTo(() => foo.Bar()).MustHaveHappened();
    A.CallTo(() => foo.Bar()).MustNotHaveHappened();
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceExactly();
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrMore();
    A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrLess();
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceExactly();
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrMore();
    A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrLess();
    
    A.CallTo(() => foo.Bar()).MustHaveHappened(4, Times.Exactly);
    A.CallTo(() => foo.Bar()).MustHaveHappened(6, Times.OrMore);
    A.CallTo(() => foo.Bar()).MustHaveHappened(7, Times.OrLess);
    
    A.CallTo(() => foo.Bar()).MustHaveHappenedANumberOfTimesMatching(n => n % 2 == 0);

New

  • Greatly reduced time to create, configure, call, and assert on Fakes (#1466, #1469, #1470, #1489, #1493, #1507)
  • Warn at configuration time that delegates can't call a base method (#1492)

Additional Items

With special thanks for contributions to this release from:

4.9.1

28 Sep 11:47
5d3f169
Compare
Choose a tag to compare

Fixed

  • Call assertions sometimes fail for concurrent calls (#1460)

Additional Items

  • Supply NuGet server URL to deployment script (#1457)
  • Update links to use https in README.md (#1459)
  • Upgrade to Bullseye 2.0.0 RC2 (#1456)

With special thanks for contributions to this release from:

4.9.0

27 Sep 11:15
503c5d1
Compare
Choose a tag to compare

New

  • New .NET Standard 2.0 assembly (#1449)
  • Small optimization in the creation of string and value-type Dummies (#1354)

Additional Items

  • Have deployment script find nuget.exe (#1430)
  • Add FakeItEasy.Build and FakeItEasy.PrepareRelease projects to solution (#1431)
  • Convert automatic deploy tool to a csproj (#1434)
  • Unpin the .NET Core SDK version (#1432)
  • Fix prepare-release tool's new release formatting and issue detection (#1429)
  • Run tests under .NET Core 2.1 (#1361, #1440)
  • Drop MSBuild in favour of dotnet build (#1441)
  • Update xunit, drop dotnet xunit in favor of dotnet test (#1444)
  • Update to SimpleExec 3.0.0 (#1452)
  • Remove build tools' dependency on xunit console runner (#1446)
  • Fixed intermittent failure for NonGenericCreationSpecs.CacheSuccessfulConstructor (#1443)
  • Document .Net Core 1.0 Runtime as build requirement (#1447)

With special thanks for contributions to this release from:

4.8.1

04 Sep 10:35
0a28896
Compare
Choose a tag to compare

Fixed

  • Source stepping is not available for net45 library (#1415)

Additional Items

  • Cross-check issues included in next milestone and mentioned in next release (#1407)
  • Upgrade Bullseye and SimpleExec build tools (#1409, #1418, #1426)
  • Exclude package versions from tool package folders (#1410)
  • Serialize dummy/fake creation in specs that count constructor calls (#1412)
  • Replace the csx scripts with full-fledged csprojs (#1413, #1424)
  • Avoid unecessary MSBuild finding (#1420)
  • Pack and test using Bullseye's fancy "enumerable input" feature (#1416)
  • Remove the "clean" build target (#1423)
  • Split analyzer projects into separate directories (#1419)
  • Be more strict with stale pull requests and reviews (#1425)

With special thanks for contributions to this release from:

4.8.0

08 Aug 10:53
4d876c1
Compare
Choose a tag to compare

New

  • Dummy failure exception should include reasons for failure (#1397)

Fixed

  • Misleading exception message when failing to create a Dummy (#1367)
  • Parameterless constructor is always tried when creating fake classes, even if there isn't one (#1395)
  • Custom attributes, additional interfaces, and constructor parameters silently dropped when creating a Fake delegate (#1353)
    The fix is to fail fast when these options are used to create Fake delegate. This may cause some tests to fail on Fake creation, rather than letting the erroneous usage go unnoticed.

Additional Items

  • Stop mentioning removed-in-4.0.0 record/playback feature in the docs (#1402)
  • Show actions after all call specifications in docs (#1342)
  • Set new NuGet API key (#1400)