Ejemplo n.º 1
0
        public void RedirectToSelf()
        {
            var sampleInput = new List <string>()
            {
                "/home -> /home"
            };

            var output   = new RouteAnalyzer().Process(sampleInput);
            var expected = new List <string>()
            {
                "/home"
            };

            Assert.IsTrue(output.SequenceEqual(expected));
        }
Ejemplo n.º 2
0
        public void SimpleRedirects()
        {
            var sampleInput = new List <string>()
            {
                "/home",
                "/our-ceo.html -> /about-us.html",
                "/about-us.html -> /about",
                "/product-1.html -> /seo"
            };

            var output   = new RouteAnalyzer().Process(sampleInput);
            var expected = new List <string>()
            {
                "/home",
                "/our-ceo.html -> /about-us.html -> /about",
                "/product-1.html -> /seo"
            };

            Assert.IsTrue(output.SequenceEqual(expected));
        }