1 12 13 package com.openedit.modules.admin; 14 15 import com.openedit.BaseTestCase; 16 import com.openedit.WebPageRequest; 17 import com.openedit.modules.admin.filemanager.TimeCopyModule; 18 import com.openedit.page.Page; 19 import com.openedit.page.manage.PageManager; 20 21 22 27 public class TimeCopyModuleTest extends BaseTestCase 28 { 29 30 public TimeCopyModuleTest(String inName) 31 { 32 super(inName); 33 } 34 35 public void testTimeCopy() throws Exception 36 { 37 PageManager pageManager = getFixture().getPageManager(); 38 Page copytestxml = getPage("/openedit/scheduler/copytest.xml"); 40 Page copyxml = getPage("/openedit/scheduler/copy.xml"); 41 getFixture().getPageManager().copyPage(copytestxml, copyxml); 42 43 Page to = getPage("/openedit/scheduler/to.html"); 45 if (to.exists()) 46 { 47 pageManager.removePage(to); 48 } 49 50 51 WebPageRequest context = getFixture().createPageRequest(); 52 TimeCopyModule mod = (TimeCopyModule) getFixture().getModuleManager().getModule("TimeCopy"); 53 mod.check(context); 54 assertTrue(to.exists()); 55 } 56 } 57 | Popular Tags |