1 16 package org.apache.cocoon; 17 18 23 public class FlowscriptReloadTestCase 24 extends HtmlUnitTestCase 25 { 26 final String pageurl = "/samples/flow/test/"; 27 final String flowscriptPath = "samples/flow/test/sendpage.js"; 28 final String paramToken = "@REPLACEME@"; 29 final String resultXPath = "html/body//p[1]"; 30 31 public void testFlowscriptReload() 32 throws Exception 33 { 34 37 final String expected1 = "replaceme-abc"; 38 copyWebappFile(flowscriptPath, paramToken, expected1); 39 loadHtmlPage(pageurl+"showString"); 40 String result1 = evalXPath(resultXPath); 41 assertEquals("Original request", expected1, result1); 42 43 46 final String expected2 = "replaceme-123"; 47 copyWebappFile(flowscriptPath, paramToken, expected2); 48 loadHtmlPage(pageurl+"showString"); 49 String result2 = evalXPath(resultXPath); 50 assertEquals("After flowscript was modified", expected2, result2); 51 } 52 } 53 | Popular Tags |