Пример #1
0
        public void FindPath_UsingUrlSource()
        {
            page1_1.DirectUrl = "/hello";
            repository.Save(page1_1);

            var path = parser.FindPath("/hello/");

            path.CurrentItem.ShouldBe(page1_1);
        }
Пример #2
0
        public void ResolvePath_NotFound_IsCalled_ForUnknownUrl()
        {
            PageNotFoundEventArgs lastEvent = null;

            parser.PageNotFound += (s, e) => lastEvent = e;

            var path = parser.FindPath("/hello/");

            path.IsEmpty().ShouldBe(true);
            lastEvent.Url.ShouldBe("/hello/");
        }