c# - Route testing with WebApiContrib -


i have webapi project trying test. have controller -

public class usercontroller : apicontroller {     public string get()     {         return "foo";     } } 

i need test route , trying use webapicontrib.testing package.

now, problem while registering routes, use globalconfiguration.configuration.routes of type httproutecollection.

in test, can access routetable.routes of type routecollection.

as result, can't register webapi routes in test, because of type incompatibility.

has encountered issue before? there obvious missing?

i resolved using:

webapiconfig.register( globalconfiguration.configuration ); 

in testfixturesetup


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -