Exemple #1
0
        public void NotElfar_GetRouteData()
        {
            // Arrange
            var route       = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext("/");

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Null);
        }
Exemple #2
0
        static void Run_GetRouteData(string url, string action)
        {
            // Arrange
            var route       = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext(url);

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Not.Null);
            Assert.That(data.Values["action"], Is.EqualTo(action));
        }
Exemple #3
0
        static void Run_GetRouteData(string action)
        {
            // Arrange
            var route       = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext("/elfar/" + Guid.Empty + (action == "Default" ? null : "/" + action));

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Not.Null);
            Assert.That(data.Values["id"], Is.EqualTo(Guid.Empty.ToString()));
            Assert.That(data.Values["action"], Is.EqualTo(action));
        }
Exemple #4
0
        public void NotElfar_GetRouteData()
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext("/");

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Null);
        }
Exemple #5
0
        static void Run_GetRouteData(string url, string action)
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext(url);

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Not.Null);
            Assert.That(data.Values["action"], Is.EqualTo(action));
        }
Exemple #6
0
        static void Run_GetRouteData(string action)
        {
            // Arrange
            var route = new Elfar.ErrorLogRoute(null);
            var httpContext = new HttpContext("/elfar/" + Guid.Empty + (action == "Default" ? null : "/" + action));

            // Act
            var data = route.GetRouteData(httpContext);

            // Assert
            Assert.That(data, Is.Not.Null);
            Assert.That(data.Values["id"], Is.EqualTo(Guid.Empty.ToString()));
            Assert.That(data.Values["action"], Is.EqualTo(action));
        }