Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Commit 7aa5515

Browse files
committed
Change test
1 parent 107eb6d commit 7aa5515

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Routing.Test/RoutingTest.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,10 @@ public void CallsFallbackWhenRoutingInvalidRouteParam(string param)
359359
}
360360

361361
[Fact]
362-
public void ThrowsWhenValidatingRouteWithNoParameters()
362+
public void AllowValidatingRouteWithNoParameters()
363363
{
364364
var routeRegistry = CreateRouteRegistry();
365-
var exception = Assert.Throws<ArgumentException>(() =>
366-
routeRegistry.Register(new Endpoint(HttpMethod.Get, RegisteredRoute), FailOnRequest, FailOnValidation));
367-
368-
Assert.Null(exception.InnerException);
365+
routeRegistry.Register(new Endpoint(HttpMethod.Get, RegisteredRoute), FailOnRequest, EmptyValidation);
369366
}
370367

371368
[Fact]
@@ -498,6 +495,10 @@ private static Unit FailOnRequest(Unit request, IDictionary<string, string> rout
498495
throw new InvalidOperationException("Request handler was unexpectedly called");
499496
}
500497

498+
private static void EmptyValidation(IEnumerable<string> parameters)
499+
{
500+
}
501+
501502
private static void FailOnValidation(IEnumerable<string> parameters)
502503
{
503504
throw new InvalidOperationException("Parameter validation has failed");

0 commit comments

Comments
 (0)