Linq – Recommendations for unit testing when using Subsonic 3.0 LINQ templates

linqsubsonicsubsonic3unit testing

I have started using Subsonic for a side project and have been loving using it. Simply a blast. I started off wanting to use the LINQ T4 Templates but have since switched to the ActiveRecord templates due to testability. It is very clear how to write unit tests using the active record templates but for the LINQ templates there is no clear testing mechanism. I have searched the docs but was wondering if anyone had recommendations for how to do this.

Thank you for your help.

Best Answer

Testing is built in to the active record stuff, but not for the Linq templates - you'd want to abstract those against a Repository or some such. Have a look at the MVC Storefront for a series on how to do this.