public void To_WithTargetRoute_SetsTargetRoute() {
            // Arrange
            var sourceRoute = new Mock<RouteBase>().Object;
            var targetRoute = new Mock<RouteBase>().Object;
            var redirectRoute = new RedirectRoute(sourceRoute, null, false);

            // Act
            redirectRoute.To(targetRoute);

            // Assert
            PAssert.IsTrue(() => redirectRoute.TargetRoute == targetRoute);
        }
        public void To_WhenTargetRouteIsAlreadySet_ThrowsException() {
            // Arrange
            var redirectRoute = new RedirectRoute(new Mock<RouteBase>().Object, new Mock<RouteBase>().Object, false);

            // Act, Assert
            Assert.Throws<InvalidOperationException>(() => redirectRoute.To(new Mock<RouteBase>().Object));
        }
        public void To_WithNullTargetRoute_ThrowsException() {
            // Arrange
            var redirectRoute = new RedirectRoute(new Mock<RouteBase>().Object, null, false);

            // Act, Assert
            Assert.Throws<ArgumentNullException>(() => redirectRoute.To(null));
        }
        public void To_WhenAdditionalRouteValuesAlreadySet_ThrowsException() {
            // Arrange
            var redirectRoute = new RedirectRoute(new Mock<RouteBase>().Object, null, false, new RouteValueDictionary());

            // Act, Assert
            Assert.Throws<InvalidOperationException>(() => redirectRoute.To(new Mock<RouteBase>().Object));
        }