NServiceBus/NServiceBus-Contrib — pull request #14 by ianbattersby (2013-07-17 12:14:25+00:00)
Title: Acceptance testing for NServiceBus 4 implementations

As discussed on Twitter with @andreasohlund we have taken the acceptance testing stuff from the main branch and made some changes to facilitate using the same scenario-based testing model but targetting actual implementations of NServiceBus 4 endpoints.

I have tried not to make breaking changes in the event this was ever merged into the main repository and used by the NSB acceptance tests themselves. Note that many of our changes are driven by the desire to NOT pollute our production code with test context, which we have achieved.

Changes are too many to remember/mention, but include:

* `MonitorSubscriptions` and `Subscribe<>` DSL helpers for manual subscribing and monitoring subscriptions.
* `IManageMessageFailures` failure handler for detecting and recording exceptions.
* `IManageUnitsOfWork` unit-of-work interceptor for detecting and recording start/end of UOW.
* `DefaultContext` (inherited from ScenarioContext) for exception, subscription, UOW.
* Ability to compose multiple `RunDescriptor` templates's (e.g. `Conventions.DefaultRunDescriptor = () => new RunDescriptor(Transports.Msmq, Builders.StructureMap);`).
* `Conventions` endpoint naming to be more unique.
* `EndpointRunner` changes to context inheritance mapping.
* `DefaultServer` changes to support above features by default.
* `ScenarioRunner` changes to better output results under both pass/fail.
* `EndpointConfigurationBuilder` changes to support convention based discovery (unobtrusive).
* Ability to define `EndpointSetup` without specifying context type (defaults to `DefaultContext`).
* Some example tests, although admit I rely on our 50+ tests here to be assured it's working.

I have updated the master rakefile to support the inclusion of this solution, but note it also has it's own rakefile (solution directory) of a later version that builds a nuget package for our internal server.

**NB:** Commits were squashed, original commits are in [my repo](https://github.com/ianbattersby/NServiceBus-Contrib/commits/feature-acceptancetest) against branch `feature-acceptancetest`.