Skip to content

0.12.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@sdcondon sdcondon released this 14 Nov 16:10

NB: Breaking change with v0.11, but compatible with v0.10 - sorry!

Test builder API changes:

  • I've restored Then() to its signature/behaviour in v0.10 - to facilitate tests with multiple cases; some but not all of which are expected to throw. Such tests look terrible to me* - but libraries should empower people, not constrain them because of subjective judgements. Then(..) in version v0.11 (i.e. the method that implicitly asserts that the When clause successfully returns) has been renamed to ThenReturns().
  • Added parameterless ThenReturns() and ThenThrows() overloads, which add an initial assertion that just verifies that the when clause returned successfully or threw.

* (I'm very much of the opinion that while FlUnit makes parameterised tests easier to do than many other frameworks, that doesn't mean that merging positive and negative cases into a single test is a good idea)