Beispiel #1
0
        static void Run_VirtualPathData(string action, string url)
        {
            // Arrange
            var route   = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values.Add("action", action);

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Not.Null);
            Assert.That(vpd.VirtualPath, Is.EqualTo(url));
        }
Beispiel #2
0
        public void NotElfar_VirtualPathData()
        {
            // Arrange
            var route   = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values["controller"] = "Default";
            request.RouteData.Values["action"]     = "Default";

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Null);
        }
Beispiel #3
0
        static void Run_VirtualPathData(string action)
        {
            // Arrange
            var route   = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values["id"]     = Guid.Empty;
            request.RouteData.Values["action"] = action;

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Not.Null);
            Assert.That(vpd.VirtualPath, Is.EqualTo("elfar/00000000-0000-0000-0000-000000000000" + (action == "Default" ? null : "/" + action)));
        }
Beispiel #4
0
        static void Run_VirtualPathData(string action, string url)
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values.Add("action", action);

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Not.Null);
            Assert.That(vpd.VirtualPath, Is.EqualTo(url));
        }
Beispiel #5
0
        static void Run_VirtualPathData(string action)
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values["id"] = Guid.Empty;
            request.RouteData.Values["action"] = action;

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Not.Null);
            Assert.That(vpd.VirtualPath, Is.EqualTo("elfar/00000000-0000-0000-0000-000000000000" + (action == "Default" ? null : "/" + action)));
        }
Beispiel #6
0
        public void NotElfar_VirtualPathData()
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var request = Request;

            request.RouteData.Values["controller"] = "Default";
            request.RouteData.Values["action"] = "Default";

            // Act
            var vpd = route.GetVirtualPath(request, request.RouteData.Values);

            // Assert
            Assert.That(vpd, Is.Null);
        }