I hope you are all as excited as I am about the latest ApprovalTests release, 2.0. This release polishes some rough edges, and adds some exciting new test scenarios. Check out Llewellyn’s release notes for details. I’ve been experimenting with CompositionTests 1.3 for a month or so, and now that ApprovalTests has released, I’m releasing 1.3 to go with it. Other than versioning compatibility, CompositionTests 1.3 doesn’t have any specific dependencies on ApprovalTests 2.0, but it seemed like a good time to release. Enjoy.
Generic VerifyCatalog Implementation
CompositionTests 1.2 introduced customized
Verify*Catalog convenience methods that automatically provide scrubbers that make sense with each catalog type. Although this worked fine, using the convenience methods meant that you needed to make an extra change to your test if you decided to change the catalog type… not very convenient!
VerifyCatalog<T> method addresses this shortcoming. The new method will take any catalog descended from
ComposablePartCatalog and attempt to find an appropriate
Verify*Catalog implementation. When the method cannot find an appropriate implementation, the default is to use
VerifyCompositionInfo with no scrubbers.
This version of CompositionTests is built against ApprovalTests 2.0. The CompositionTests 1.2.0 NuGet package incorrectly specified the ApprovalTests dependency as
x >= 1.9. Because the ApprovalTest assemblies are signed, dependent assemblies (like CompositionTests) will only load the ApprovalTests assembly which they are built against, so “greater than or equal to” should have been “exactly equal to”. The package for CompositionTests 1.3.0 correctly specifies the dependency as
x == 2.0.
If CompostionTests stopped working for you after upgrading to ApprovalTests 2.0, this release should fix that for you.
Composition are obsolete and will be removed in a future release. Please migrate to
Go Get It
As usual you can get the bits from github or NuGet!