Exemple #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"));
        }
Exemple #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"));
        }
Exemple #3
0
        public void FirstTokenOfEmptySegment()
        {
            PortalRequest request = new PortalRequest();

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

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