Exemplo n.º 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());
 }
Exemplo n.º 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());
 }
Exemplo n.º 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());
 }