views:

54

answers:

1

I'm trying to find some best-practice examples (or any examples, actually) of using Machine.Specifications with the ASP.Net Entity Framework in an MVC project.

Not having had much experience with Machine.Specifications, I'm keen to see what sort of tests other people find useful and whether there are any gotchas for using the EF-generated objects instead of custom-built ones.

Pointers, suggestions and examples much appreciated.

+2  A: 

This is the blog post that got me started using machine.spec, http://blog.wekeroad.com/blog/make-bdd-your-bff-2/

Rob, goes through the complete setup, from installation to writing specs. It doesn't use EF, but it should still get you headed in the right direction. I used SubSonic in my learning project.

37Stars
Figures that Rob would've done a post on it. Should've read that first (RTFM?) since I only learned of Machine.Specifications from his Tekpub series on Build Your Own Blog. Thanks for the tip.
Phil.Wheeler
So Rob's post essentially covers off exactly what's in his Tekpub episode - writing tests against a from-scratch class. I'm after examples of tests that have classes built by an ORM designer: EF, Linq-to-Sql Classes, etc.
Phil.Wheeler
I haven't seen that episode. There is a video I've seen somewhere where he ties the tests to SubSonic. Would that be of help? If so I will see if I can track it down.
37Stars
Yeah, actually. That might be a great help.
Phil.Wheeler