Make parameter transformer test verifiable (#804)

This commit is contained in:
James Newton-King 2018-09-20 12:41:29 -07:00 committed by GitHub
parent a657c3bdf2
commit c559498632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -306,8 +306,8 @@ namespace Microsoft.AspNetCore.Routing
public void TryProcessTemplate_ParameterPolicy_Includes_BufferedValues()
{
// Arrange
var endpoint = EndpointFactory.CreateRouteEndpoint("Foo/{bar=BAR}/{id?}", policies: new { bar = new SlugifyParameterTransformer(), });
var linkGenerator = CreateLinkGenerator(new RouteOptions() { LowercaseUrls = true }, endpoints: new[] { endpoint, });
var endpoint = EndpointFactory.CreateRouteEndpoint("Foo/{bar=MyBar}/{id?}", policies: new { bar = new SlugifyParameterTransformer(), });
var linkGenerator = CreateLinkGenerator(endpoints: new[] { endpoint, });
var httpContext = CreateHttpContext();
// Act
@ -321,7 +321,7 @@ namespace Microsoft.AspNetCore.Routing
// Assert
Assert.True(success);
Assert.Equal("/foo/bar/18", result.path.ToUriComponent());
Assert.Equal("/Foo/my-bar/18", result.path.ToUriComponent());
Assert.Equal(string.Empty, result.query.ToUriComponent());
}