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
Post a Comment