Skip to content

Commit

Permalink
Return a copy of the route values in functional tests.
Browse files Browse the repository at this point in the history
This is a workaround for a Json.Net + CoreCLR issue.
  • Loading branch information
rynowak committed Jul 31, 2014
1 parent 7ec4ab0 commit 99d053e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/WebSites/RoutingWebSite/TestResponseGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc;
using Microsoft.Framework.DependencyInjection;
Expand Down Expand Up @@ -40,7 +41,7 @@ public JsonResult Generate(params string[] expectedUrls)
{
expectedUrls = expectedUrls,
actualUrl = _actionContext.HttpContext.Request.Path.Value,
routeValues = _actionContext.RouteData.Values,
routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),

action = _actionContext.ActionDescriptor.Name,
controller = ((ReflectedActionDescriptor)_actionContext.ActionDescriptor).ControllerDescriptor.Name,
Expand Down

0 comments on commit 99d053e

Please sign in to comment.