cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-10-11 Thread jmitchell
jmitchell2003/10/11 19:31:42

  Modified:web/test/test/org/apache/struts/taglib/bean
TestIncludeTag.jsp
  Log:
  Oops, forgot to remove some debug stuff.
  
  Revision  ChangesPath
  1.4   +0 -12 
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp
  
  Index: TestIncludeTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestIncludeTag.jsp11 Oct 2003 23:18:17 -  1.3
  +++ TestIncludeTag.jsp12 Oct 2003 02:31:42 -  1.4
  @@ -12,18 +12,6 @@

Test Value

  -
  -<%
  -System.out.println("=>Request:" + request);
  -System.out.println("=>request.getServerPort():" + request.getServerPort());
  -System.out.println("=>request.getRequestURI():" + request.getRequestURI());
  -System.out.println("=>INCLUDE_TAG_KEY:" + 
pageContext.getAttribute("INCLUDE_TAG_KEY"));
  -System.out.println("=>EXPECTED_RESULTS:" + 
pageContext.getAttribute("EXPECTED_RESULTS"));
  -
  -if (true)
  - throw new Exception();
  -%>
  -
   
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-10-11 Thread jmitchell
jmitchell2003/10/11 16:18:17

  Modified:src/test/org/apache/struts/taglib/bean TestIncludeTag.java
   web/test/test/org/apache/struts/taglib/bean
TestIncludeTag.jsp
  Log:
  Modified to fit the latest testing schema that guarantees a success or failure
  and (I'm 99.5% sure) will not give false positives.
  
  There are other tags that need this change, but I'm working on bigger fish at
  the moment.  (The testing container port issue)
  
  The tests are still failing and that's my top priority (at the moment)
  
  Revision  ChangesPath
  1.7   +12 -30
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestIncludeTag.java
  
  Index: TestIncludeTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestIncludeTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestIncludeTag.java   30 Sep 2003 00:15:47 -  1.6
  +++ TestIncludeTag.java   11 Oct 2003 23:18:17 -  1.7
  @@ -63,8 +63,6 @@
   import junit.framework.TestSuite;
   
   import org.apache.cactus.JspTestCase;
  -import org.apache.cactus.WebResponse;
  -import org.apache.commons.lang.StringUtils;
   
   /**
* Suite of unit tests for the
  @@ -74,8 +72,6 @@
*/
   public class TestIncludeTag extends JspTestCase {

  -protected final static String TEST_VAL = "Test Value";
  -
   /**
* Defines the testcase name for JUnit.
*
  @@ -108,52 +104,38 @@
   private void runMyTest(String whichTest){
request.setAttribute("runTest", whichTest);
   try {
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp");
  + pageContext.forward(
  + request.getRequestURI() + 
"/org/apache/struts/taglib/bean/TestIncludeTag.jsp");
}
catch (Exception e) {
e.printStackTrace();
fail("There is a problem that is preventing the tests to 
continue!");
}
   }
  -
  - private void formatAndTest(String compare, String output) {
  - //fix for introduced carriage return / line feeds
  - output = StringUtils.replace(output,"\r","");
  - output = StringUtils.replace(output,"\n","");
  - output = output.trim();
  - //System.out.println("Testing [" + compare + "] == [" + output + "]");
  - assertEquals(compare, output);
  - }
  -
   
   /*
  - * Testing IncludeTag using forward="something"
  + * Testing IncludeTag using the forward attribute.
*/
   public void testIncludeTagForward(){ 
  +//   
System.out.println("[TestIncludeTag.java]>request.getServerPort():" + 
request.getServerPort());
  +//   
System.out.println("[TestIncludeTag.java]>request.getRequestURI():" + 
request.getRequestURI());
  +//   
System.out.println("[TestIncludeTag.java]>request.getRequestURL():" + 
request.getRequestURL());
  +//   
System.out.println("[TestIncludeTag.java]>request.getQueryString():" + 
request.getQueryString());
runMyTest("testIncludeTagForward");
}
  - public void endIncludeTagForward(WebResponse response){
  - formatAndTest(TEST_VAL, response.getText());
  - }
   
   /*
  - * Testing IncludeTag
  + * Testing IncludeTag using the href attribute.
*/
   public void testIncludeTagHref(){ 
runMyTest("testIncludeTagHref");
}
  - public void endIncludeTagHref(WebResponse response){
  - formatAndTest(TEST_VAL, response.getText());
  - }
   
   /*
  - * Testing IncludeTag using page="/something"
  + * Testing IncludeTag using the page attribute
*/
   public void testIncludeTagPage(){ 
runMyTest("testIncludeTagPage");
  - }
  - public void endIncludeTagPage(WebResponse response){
  - formatAndTest(TEST_VAL, response.getText());
}
   
   
  
  
  
  1.3   +48 -8 
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp
  
  Index: TestIncludeTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIncludeTag.jsp9 Mar 2003 16:04:52 -   1.2
  +++ TestIncludeTag.jsp11 Oct 2003 23:18:17 -  1.3
  @@ -1,25 +1,65 @@
   <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  +<[EMAIL PROTECTED] import="junit.framework.Assert"%>
   <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
   <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %

RE: cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-03-09 Thread James Mitchell
>   Fix Include to to assume the context is '/test'

Should have been...

>   Fix Include to not assume the context is '/test'
   ^^^


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, March 09, 2003 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-struts/web/test/test/org/apache/struts/taglib/bean 
> TestIncludeTag.jsp
> 
> 
> jmitchell2003/03/09 08:04:53
> 
>   Modified:web/test/test/org/apache/struts/taglib/bean
> TestIncludeTag.jsp
>   Log:
>   Fix Include to to assume the context is '/test'
>   
>   Revision  ChangesPath
>   1.2   +2 -1  
> jakarta-struts/web/test/test/org/apache/struts/taglib/bean/Tes
> tIncludeTag.jsp
>   
>   Index: TestIncludeTag.jsp
>   ===
>   RCS file: 
> /home/cvs/jakarta-struts/web/test/test/org/apache/struts/tagli
> b/bean/TestIncludeTag.jsp,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- TestIncludeTag.jsp  22 Feb 2003 02:57:36 -  1.1
>   +++ TestIncludeTag.jsp  9 Mar 2003 16:04:52 -   1.2
>   @@ -1,6 +1,7 @@
><%@ page contentType="text/html;charset=UTF-8" language="java" %>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>   +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
>
>forward="testIncludeTagForward"/>
>   @@ -9,7 +10,7 @@
>
>
>   
>   -   
> http://<%=request.getServerName()%>:<%=request.getServerPort()
%>/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp
  +
http://<%=request.getServerName()%>:<%=request.getServerPort()%>


   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-03-09 Thread jmitchell
jmitchell2003/03/09 08:04:53

  Modified:web/test/test/org/apache/struts/taglib/bean
TestIncludeTag.jsp
  Log:
  Fix Include to to assume the context is '/test'
  
  Revision  ChangesPath
  1.2   +2 -1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp
  
  Index: TestIncludeTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestIncludeTag.jsp22 Feb 2003 02:57:36 -  1.1
  +++ TestIncludeTag.jsp9 Mar 2003 16:04:52 -   1.2
  @@ -1,6 +1,7 @@
   <%@ page contentType="text/html;charset=UTF-8" language="java" %>
   <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
   <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
   
   

  @@ -9,7 +10,7 @@
   
   

  - 
http://<%=request.getServerName()%>:<%=request.getServerPort()%>/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp
  + http://<%=request.getServerName()%>:<%=request.getServerPort()%>


   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]