Skip to content

Commit 91fddcc

Browse files
committed
Fixed MvcRouteResolverTests
1 parent b78ca79 commit 91fddcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/MyTested.AspNetCore.Mvc.Routing.Test/InternalTests/RoutingTests/MvcRouteResolverTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace MyTested.AspNetCore.Mvc.Test.InternalTests.RoutingTests
22
{
3+
using System;
34
using System.IO;
45
using System.Reflection;
56
using Internal.Application;
@@ -303,14 +304,16 @@ public void ResolveShouldResolveCorrectlyWithJsonContentBodyAndQueryString()
303304
[Fact]
304305
public void ResolveShouldReturnProperErrorWhenTwoActionsAreMatched()
305306
{
307+
var newLine = Environment.NewLine;
308+
306309
var routeInfo = MvcRouteResolver.Resolve(
307310
TestApplication.RoutingServices,
308311
TestApplication.Router,
309312
this.GetRouteContext("/Normal/ActionWithOverloads"));
310313

311314
Assert.False(routeInfo.IsResolved);
312315
Assert.Equal(
313-
"exception was thrown when trying to select an action: 'Multiple actions matched. The following actions matched route data and had all constraints satisfied:\n\nMyTested.AspNetCore.Mvc.Test.Setups.Routing.NormalController.ActionWithOverloads (MyTested.AspNetCore.Mvc.Test.Setups)\nMyTested.AspNetCore.Mvc.Test.Setups.Routing.NormalController.ActionWithOverloads (MyTested.AspNetCore.Mvc.Test.Setups)'",
316+
$"exception was thrown when trying to select an action: 'Multiple actions matched. The following actions matched route data and had all constraints satisfied:{newLine}{newLine}MyTested.AspNetCore.Mvc.Test.Setups.Routing.NormalController.ActionWithOverloads (MyTested.AspNetCore.Mvc.Test.Setups){newLine}MyTested.AspNetCore.Mvc.Test.Setups.Routing.NormalController.ActionWithOverloads (MyTested.AspNetCore.Mvc.Test.Setups)'",
314317
routeInfo.UnresolvedError);
315318
Assert.Null(routeInfo.ControllerType);
316319
Assert.Null(routeInfo.ControllerName);

0 commit comments

Comments
 (0)