From 99d053ef81aca0291a9ad752185172490dbf1b10 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 31 Jul 2014 15:09:47 -0700 Subject: [PATCH] Return a copy of the route values in functional tests. This is a workaround for a Json.Net + CoreCLR issue. --- test/WebSites/RoutingWebSite/TestResponseGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/WebSites/RoutingWebSite/TestResponseGenerator.cs b/test/WebSites/RoutingWebSite/TestResponseGenerator.cs index 0dd134fc94..8ab5b8ed5e 100644 --- a/test/WebSites/RoutingWebSite/TestResponseGenerator.cs +++ b/test/WebSites/RoutingWebSite/TestResponseGenerator.cs @@ -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; @@ -40,7 +41,7 @@ namespace RoutingWebSite { expectedUrls = expectedUrls, actualUrl = _actionContext.HttpContext.Request.Path.Value, - routeValues = _actionContext.RouteData.Values, + routeValues = new Dictionary(_actionContext.RouteData.Values), action = _actionContext.ActionDescriptor.Name, controller = ((ReflectedActionDescriptor)_actionContext.ActionDescriptor).ControllerDescriptor.Name,