c# - How to configure in-memory unit testing of ASP.NET Web Api 2 OData service? -


this article presents elegant way of in-memory testing asp.net web api sites: instance of httpclient created using httpserver constructor argument, , after client's requests executed within same process.

i trying achieve same odata service. compiled sample odata service using asp.net web api 2 odata classes, generated service reference in client project (and referenced web site project), test code doesn't communicate odata service. code:

    var ctx = new container(new uri("http://www.myservice.com/"));     collectionassert.isnotempty(ctx.products); 

i can see it's making in-memory call container web site, doesn't reach odata service. missing configuration trick?


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -