Пример #1
0
        public void ItShouldThrowHandlerErrorOnMapUrlToPage()
        {
            Action act = () => OutboundUrl.NamedRouteContext("incorrectRouteName").Should().MapToUrl(ExpectedUrl);

            act.ShouldThrow <ArgumentException>()
            .WithMessage("A route named 'incorrectRouteName' could not be found in the route collection.*");
        }
Пример #2
0
        public void ItShouldThrowUrlErrorOnMapRouteToIncorrectUrl()
        {
            Action act = () => OutboundUrl.NamedRouteContext(ActualRouteName).Should().MapToUrl("/Incorrect/Url");

            act.ShouldThrow <AssertionException>()
            .WithMessage("Expected outboundurl to resolve Url to \"/Incorrect/Url\", but found \"/Route/Name\".");
        }
Пример #3
0
 public void ItShouldMapRouteToUrl()
 {
     OutboundUrl.NamedRouteContext(ActualRouteName).Should().MapToUrl(ExpectedUrl);
 }