Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: Enable all the setup code to be done in the controller rather than on several objects [927]

$
0
0
When writing a unit test, the user needs to do setup for objects in several places
```
HttpConfiguration configuration = new HttpConfiguration();
controller.Configuration = configuration;
request.Properties[HttpPropertyKeys.HttpConfigurationKey] = configuration;
controller.Request = request;
request.Properties[HttpPropertyKeys.HttpRouteDataKey] = routeData;
```

Allow for all the setup to be made in ApiController or in Request
```
controller.Configuration = configuration;
controller.Request = request;
controller.RouteData = routeData;
```

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>