Releases: sdcondon/FlUnit
0.14.0
- Implementation of test run configuration:
- With the VSTest adapter, test run configuration can be specified with .runsettings. See user guide for details.
- Test settings that affect individual tests can be overridden via the
UsingConfiguration
builder method. - Available test settings are fairly minimal to begin with:
Parallelise
: Whether or not test execution should be parallelised. Defaults to true. Partitioning not yet supported.FailedArrangementOutcomeIsSkipped
: A value determining what the test result should be if one of the "Given" clauses throws.ResultNamingStrategy
: Strategy to use to name individual test results. Only specifiable withUsingConfiguration
for now.
- Significant refactoring in test adapter to separate core FlUnit discovery and execution logic from the VSTest integration. Ultimately aim to pull the core stuff out into its own assembly - but will probably wait until if/when there is a second adapter to actually do that.
0.13.0
- Fixed the VSTest adapter so that it doesn't completely fail when no PDB is available.
- Added explicit targeting for .NET 6 to the FlUnit package. The NET 6 version of the framework takes a different and less limited approach to automatic assertion naming. Rather than using LINQ expressions, this version utilises .NET 6 / C# 10's CallerArgumentExpression attribute. With this approach, you are no longer limited to expressions that LINQ expressions can represent (in particular, calling methods with optional args is now fine), and there are less output surprises due to the expression tree round-trip. Should be slightly faster at runtime, too.
0.12.0
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 toThenReturns()
. - Added parameterless
ThenReturns()
andThenThrows()
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)
0.11.0
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 aThenDoesntThrow()
. - 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.
0.10.0
0.9.0
Nothing major (I've not spent a huge amount of time on this recently), just:
- Dependency upgrades
- Added support for test traits - they work the same as in xUnit - via a
Trait
attribute applied to the assembly, class or property - Removed needless (and problematic)
Cases
setter fromTest
base class
0.8.0
A few minor tweaks. Being completely honest, this is mostly me putting off doing actual useful things in the VSTest adapter - because I think I've gone about as far as can go by just hacking stuff together - and now need to properly get my head around the VSTest platform to turn it into a real fully-functioning test adapter. Anyway, the changes:
- Changed the ID of the Adapter package so that its no longer dictated by the naming convention for VSTest adapter assemblies. New package ID is
FlUnit.Adapters.VSTest
. I'll deprecate the old one. - Dependency upgrades
- Added an icon, because why do real work when I can mess about in paint.net..
0.7.0
Improved adapter structure so that private dependencies no longer propagate inappropriately, and the adapter assembly is no longer inappropriately available as a compile-time ref in consuming projects. Package structure now broadly mimics how MSTest and XUnit adapters seem to do things.