Skip to content

0.11.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@sdcondon sdcondon released this 25 Oct 11:56

NB: BREAKING CHANGE (which semver allows without a major version bump for v0):

  • Split "Then" into "Then" and "ThenThrows". See updated README for examples. The When clause of a test will either complete successfully or throw. As such, it doesn't make much sense for assertions to deal with an object that gives access to both the return value and the exception - and this approach makes for needlessly long assertions. So, going forwards, we have two ways to start providing assertions. Firstly, Then, which fails by throwing the exception (stack trace intact) if one was thrown, and (in the case of test functions) gives you just the return value to work with. Secondly, ThenThrows, for expecting an exception. The only situation I can see that this perhaps makes a little more awkward is if you want to assert just that an exception wasn't thrown (which was previously easy - if a little ugly - by asserting that the outcome's exception is null) - but this isn't a common scenario, and could always be supported with a ThenDoesntThrow().
  • Added coverlet.collector to example test project, just to verify that it works.
  • Test classes now throw if queried for Cases before being arranged. Yes, this will only affect badly behaved adapters - but is a trivial change, so might as well.