I'm trying to implement BDD/TDD on my team as seamlessly as possible. Gated check-in for Team Build only supports MSTest, and Microsoft Pex and Moles cooperate very nicely. For BDD, I'm most impressed with MSpec, and the MSMSpec T4 Template will convert those tests to MSTest, but MSpec and Moles cannot work together, it seems. (See: Is there a workaround for setting [HostType("Moles")] when dealing with anonymous methods in MSpec?)
So:
- MSTest is fine for unit tests, and works with Team Build, but is not great for BDD.
- Other mocking frameworks work with both MSpec and MSTest, but Moles is being promoted to Microsoft.Fakes with VS 11, and does things that I don't think are possible with other frameworks.
- Close substitutes I've found for MSPec such as NSpec only generate NUnit tests, not MSTest.
What combination of tools works together?
Update: SpecFlow won't work with Moles, either, as the TestMethods are in generated code and I don't see a way to modify the code generator to include the necessary HostType attribute. Trying out StoryQ next.
Update 2: It turns out that it's not terribly hard to extend SpecFlow to work with Moles, so I'm going with that for now, but I'd still be interested to hear input.