Unit testing ado.net data services RRS feed

  • Question

  • I am looking at Data Services vs using the EF via a Web Service. How do people go about doing unit tests with the ADO.net data services. Does the unit testing have to be done on the client app calling the web service.

    Sunday, September 28, 2008 11:12 AM


  • What I would do is make sure you create a ASP.Net Web Application project (not a Web Site), then you have a normal project with a dll that you can use what ever unit testing tool you want.  This would allow you to test your public [WebGet]and private methods.  You can test the whole backend, as you say, from the client.  I would also create a client proxy (i.e. ServiceClient) that surfaces all your webgets, etc in one class instead of have get/set logic sprinkled all over a form or web page.  Then you run unit tests on that proxy to get the full end-to-end effect.

    Sunday, September 28, 2008 4:34 PM