Changed
New
- Make descriptions of calls to property accessors more consistent (#1299)
- New API for asserting completed calls (#1292, #1300)
Replaces calls that used theRepeated
class, which will be deprecated in version 5.0.0 and removed in 6.0.0.
Here's the new API:A.CallTo(() => fake.Method()).MustHaveHappened() // as today A.CallTo(() => fake.Method()).MustNotHaveHappened() // as today A.CallTo(() => fake.Method()).MustHaveHappenedOnceExactly() A.CallTo(() => fake.Method()).MustHaveHappenedOnceOrMore() A.CallTo(() => fake.Method()).MustHaveHappenedOnceOrLess() A.CallTo(() => fake.Method()).MustHaveHappenedTwiceExactly() A.CallTo(() => fake.Method()).MustHaveHappenedTwiceOrMore() A.CallTo(() => fake.Method()).MustHaveHappenedTwiceOrLess() A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.Exactly) A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.OrMore) A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.OrLess) A.CallTo(() => fake.Method()).MustHaveHappenedANumberOfTimesMatching(n => n %2 == 0)
Fixed
- Inconsistent wording for call count in assertion error messages (#1278)
Raise.FreeForm.With
is not available from VB.Net and our only alternative is deprecated (#1287)
CreatedRaise.FreeForm<TEventHandler>.With
that can be used from Visual Basic- Word "repeated" in assertion failure messages may mislead reader (#1290)
- Call description is wrong when asserting a call to a property setter (#1298)
Additional Items
- Simplify analyzers packaging (#1283)
- Document Raise.FreeForm.With limitation and dependency (#1286)
- Upgrade to StyleCop.Analyzers 1.1.0-beta006 (#1304)
With special thanks for contributions to this release from:
- Jeremy Holovacs - @jholovacs
- Mertsch - @Mertsch
- MrVermond - @MrVermond