Skip to content

5.0.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@blairconrad blairconrad released this 10 Dec 12:14
· 796 commits to master since this release
5a72a1e

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: