Ejemplo n.º 1
0
        public void FirstTokenOfSingleSegment()
        {
            PortalRequest request = new PortalRequest();

            request.AddToken("category", "/Products/");
            request.AddToken("category2", "/Products");

            Assert.AreEqual("Products", request.GetFirstTokenSegmentValue("category"));
            Assert.AreEqual("Products", request.GetFirstTokenSegmentValue("category2"));
        }
Ejemplo n.º 2
0
        public void FirstTokenOfMultiSegment()
        {
            PortalRequest request = new PortalRequest();

            request.AddToken("category", "/Products/WallMounts/Cantilever/");
            request.AddToken("category2", "Products/WallMounts/Cantilever/");

            Assert.AreEqual("Products", request.GetFirstTokenSegmentValue("category"));
            Assert.AreEqual("Products", request.GetFirstTokenSegmentValue("category2"));
        }
Ejemplo n.º 3
0
        public void FirstTokenOfEmptySegment()
        {
            PortalRequest request = new PortalRequest();

            request.AddToken("category", "/");

            Assert.AreEqual("", request.GetFirstTokenSegmentValue("category"));
        }