01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wiki;
04:
05: //TODO rename me
06: public class MockingPageCrawler implements PageCrawlerDeadEndStrategy {
07: public WikiPage getPageAfterDeadEnd(WikiPage context,
08: WikiPagePath restOfPath, PageCrawler crawler)
09: throws Exception {
10: return createMockPage(restOfPath.last(), context);
11: }
12:
13: public static WikiPage createMockPage(String pageName,
14: WikiPage context) throws Exception {
15: MockWikiPage mockPage = new MockWikiPage(pageName, "");
16: mockPage.setParent(context);
17: return mockPage;
18: }
19: }
|