Пример #1
0
 @Test
 public void DirectoryWithContentIsFileSystemPage() throws Exception {
   fileSystem.makeFile("./somepath/WikiPage/content.txt", "stuff");
   fileSystem.makeFile("./somepath/WikiPage/subsuite/myfile.html", "stuff");
   WikiPage page = pageRepository.makeChildPage("WikiPage", rootPage);
   assertEquals(FileSystemPage.class, page.getClass());
 }
Пример #2
0
 @Test
 public void DirectoryOfHtmlFilesIsExternalSuitePageChild() throws Exception {
   fileSystem.makeFile("./somepath/ExternalSuite/subsuite/myfile.html", "stuff");
   ExternalSuitePage page =
       (ExternalSuitePage) pageRepository.makeChildPage("ExternalSuite", rootPage);
   WikiPage child = pageRepository.findChildren(page).get(0);
   assertEquals(ExternalSuitePage.class, child.getClass());
   assertEquals("SubsuitE", child.getName());
 }
Пример #3
0
 @Test
 public void DirectoryOfDirectoryOfHtmlFilesIsExternalSuitePage() throws Exception {
   fileSystem.makeFile("./somepath/ExternalSuite/subsuite/myfile.html", "stuff");
   WikiPage page = pageRepository.makeChildPage("ExternalSuite", rootPage);
   assertEquals(ExternalSuitePage.class, page.getClass());
 }