Welcome to

Magenic Technologies Community Blog

Sign in | Join | Help

Aaron's Technology Musings

Who let this guy on the podium?

Linq Unit Test Set

Whew - just completed my first pass at my unit test suite for our custom query provider in CSLA.net.

I do find it deeply ironic that the test suite was substantially more work and time involved than writing the provider itself.  That said, I would certainly say that it would be very nice if Microsoft, or someone, would write a default Linq query provider class that one could inherit from, rather than forcing the extension method route.  If you need to control aspects of CreateQuery and Execute in certain cases (i.e. return something other than what Linq to Objects returns by default), but not everything, you are going to be faced with a great deal of work.

So the long and short of it is that I did not initially intend to write a unit test across the entire Linq to objects implementation, but in the end, we did anyway, and I can definitely say that I am glad that I did.  If we decide to start optimizing aspects of the CslaQueryProvider in the future, we should at least have a nice way to know if we are breaking things.

Published Sunday, January 20, 2008 2:13 PM by aarone

Filed under: ,

Comments

No Comments

New Comments to this post are disabled
Powered by Community Server, by Telligent Systems