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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -