views:

28

answers:

0

hey folks,

I'm currently using Stephen Walther's approach to unit testing Linq to SQL and the datacontext (http://stephenwalther.com/blog/archive/2008/08/17/asp-net-mvc-tip-33-unit-test-linq-to-sql.aspx) which is working a treat for all things linq.

My Dal layer takes in an IDataContext, I use DI (via Unity) to concrete that up as the correct DataContext object and all works well.

But - we have a company policy here of writes going via Stored Procs.

Has anyone come up with a solution for mocking/faking the data context and still allowing stored procs to effectively be unit tested?

I've got no real experience of any of the mocking frameworks (Rhino etc.) so if these are the correct means of doing this, I'd love some pointers on guides for them.

Many thanks, Terry