portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddew...@apache.org
Subject svn commit: r279690 - in /portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main: java/org/apache/pluto/testsuite/TestConfig.java java/org/apache/pluto/testsuite/TestConfigFactory.java webapp/jsp/introduction.jsp webapp/jsp/test_results.inc
Date Fri, 09 Sep 2005 03:30:31 GMT
Author: ddewolf
Date: Thu Sep  8 20:30:26 2005
New Revision: 279690

URL: http://svn.apache.org/viewcvs?rev=279690&view=rev
Log:
PLUTO-162
-- Refactoring testsuite.
-- Applied patches except singleton patch

Modified:
    portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
    portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
    portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
    portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/test_results.inc

Modified: portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java?rev=279690&r1=279689&r2=279690&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
Thu Sep  8 20:30:26 2005
@@ -15,7 +15,9 @@
  */
 package org.apache.pluto.testsuite;
 
+import java.io.Serializable;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -25,14 +27,15 @@
  * @version 1.0
  * @since Sep 15, 2004
  */
-public class TestConfig {
+public class TestConfig implements Serializable {
 
     private String testClassName;
     private String name;
+    private String plt;
     private String displayURI;
-    private Map initParams = new java.util.HashMap();
-    private Map actionParameters = new java.util.HashMap();
-    private Map renderParameters = new java.util.HashMap();
+    private Map initParams = new HashMap();
+    private Map actionParameters = new HashMap();
+    private Map renderParameters = new HashMap();
 
     public TestConfig() {
 
@@ -54,6 +57,14 @@
         this.name = testName;
     }
 
+    public String getPlt() {
+    	return plt;
+    }
+    
+    public void setPlt(String plt) {
+    	this.plt = plt;
+    }
+    
     public String getDisplayURI() {
         return displayURI;
     }
@@ -87,7 +98,9 @@
     }
 
     public String toString() {
-        return super.toString()+"<"+getName()+">";
+    	StringBuffer buffer = new StringBuffer(super.toString());
+    	buffer.append("<").append(getName()).append(">");
+    	return buffer.toString();
     }
 }
 

Modified: portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java?rev=279690&r1=279689&r2=279690&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
Thu Sep  8 20:30:26 2005
@@ -43,6 +43,9 @@
         digester.addBeanPropertySetter("testportlet-config/testsuite-config/name",
                                        "name");
 
+        digester.addBeanPropertySetter("testportlet-config/testsuite-config/plt",
+                                       "plt");
+
         digester.addBeanPropertySetter("testportlet-config/testsuite-config/class",
                                        "testClassName");
 

Modified: portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/introduction.jsp?rev=279690&r1=279689&r2=279690&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
Thu Sep  8 20:30:26 2005
@@ -33,7 +33,8 @@
     <P>Please select one of the following tests:
     <TABLE>
     <c:forEach var="test" items="${tests}" varStatus="status">
-    <TR><TD><c:out value="${test.name}"/></TD>
+    <TR><TD><c:out value="${test.plt}"/></TD>
+        <TD><c:out value="${test.name}"/></TD>
         <portlet:actionURL secure='<%=renderRequest.isSecure()?"True":"False"%>'
var="url">
     	<portlet:param name="testId" value='<%=((javax.servlet.jsp.jstl.core.LoopTagStatus)pageContext.getAttribute("status")).getIndex()+""%>'/>
         <c:forEach var="param" items="${test.actionParameters}">
@@ -43,9 +44,9 @@
           <portlet:param name="<%=parm.getKey().toString()%>" value="<%=parm.getValue().toString()%>"/>
         </c:forEach>
         </portlet:actionURL>
-        <TD><A href="<c:out value="${url}"/>">Test</A></TD>
+        <TD><A href="<c:out value="${url}"/>">Test</A></TD></TR>
     </c:forEach>
     </TABLE>
     </P>
     </TD></TR>
-</TABLE>
\ No newline at end of file
+</TABLE>

Modified: portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/test_results.inc
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/test_results.inc?rev=279690&r1=279689&r2=279690&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/test_results.inc
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-testsuite/src/main/webapp/jsp/test_results.inc
Thu Sep  8 20:30:26 2005
@@ -14,8 +14,10 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 --%>
+
+
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
 
 <%
     pageContext.setAttribute("passed", "Passed");
@@ -25,42 +27,80 @@
 
 <portlet:defineObjects/>
 
-<TABLE style="font-size: -1">
-<c:choose>
-<c:when test="${results.failed}">
-<TR><TH colspan="2" style="background-color:red;color:white">FAILED</TH></TR>
-</c:when>
-<c:when test="${results.inQuestion}">
-<TR><TH colspan="2" style="background-color:yellow">WARNING</TH></TR>
-</c:when>
-<c:otherwise>
-<TR><TH colspan="2" style="background-color:green;color:white">PASSED</FONT></c:otherwise>
-</c:choose>
-
-<TR><TH></TH>
-    <TH><c:out value="${results.name}"/></TH>
-<c:forEach var="result" varStatus="status" items="${results.collection}">
-<TR><TD valign="top">
-    <c:choose>
-    <c:when test="${result.returnCode==passed}">
-    <IMG src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/images/yes.gif")%>"
border="0">
+<table style="font-size: -1">
+  <c:choose>
+    <c:when test="${results == null}">
+      <tr>
+        <th colspan="2" style="background-color: red; color: white">RESULT NOT FOUND</th>
+      </tr>
     </c:when>
-    <c:when test="${result.returnCode==failed}">
-    <IMG src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/images/no.gif")%>"
border="0">
+    <c:when test="${results.failed}">
+      <tr>
+        <th colspan="2" style="background-color: red; color: white">FAILED</th>
+      </tr>
     </c:when>
-    <c:otherwise>
-    <IMG src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/images/question.gif")%>"
border="0">
-    </c:otherwise>
-    </c:choose>
-    </TD>
-    <TD style="font-size:12px;" nowrap="true"><c:out value="${result.name}"/></TD></TR>
-    <c:choose>
-    <c:when test="${result.returnCode==passed}">
-    <TR><TD></TD><TD style="font-size:10px;"><c:out value="${result.desc}"/></TD></TR>
+    <c:when test="${results.inQuestion}">
+      <tr>
+        <th colspan="2" style="background-color: yellow">WARNING</th>
+      </tr>
     </c:when>
     <c:otherwise>
-    <TR><TD></TD><TD style="font-size:10px;"><c:out value="${result.results}"/></TD></TR>
+      <tr>
+        <th colspan="2" style="background-color: green; color: white">PASSED</th>
+      </tr>
     </c:otherwise>
+  </c:choose>
+  
+  <tr>
+    <th />
+    <th><c:out value="${results.name}"/></th>
+  </tr>
+  
+  <c:forEach var="result" varStatus="status" items="${results.collection}">
+    <tr>
+      
+      <!-- Result Icon ===================================================== -->
+      <td valign="top">
+        <c:choose>
+          <c:when test="${result.returnCode == passed}">
+            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() +
"/images/yes.gif") %>"
+                 border="0" />
+          </c:when>
+          <c:when test="${result.returnCode == failed}">
+            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() +
"/images/no.gif") %>"
+                 border="0" />
+          </c:when>
+          <c:otherwise>
+            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() +
"/images/question.gif") %>"
+                 border="0" />
+          </c:otherwise>
+        </c:choose>
+      </td>
+      
+      <td style="font-size:12px;" nowrap="true">
+        <c:out value="${result.name}"/>
+      </td>
+    </tr>
+    
+    <c:choose>
+      <c:when test="${result.returnCode == passed}">
+        <tr>
+          <td />
+          <td style="font-size:10px;">
+            <c:out value="${result.desc}"/>
+          </td>
+        </tr>
+      </c:when>
+      <c:otherwise>
+        <tr>
+          <td />
+          <td style="font-size:10px;">
+            <c:out value="${result.results}"/>
+          </td>
+        </tr>
+      </c:otherwise>
     </c:choose>
-</c:forEach>
-</TABLE>
\ No newline at end of file
+  </c:forEach>
+  
+</table>
+



Mime
View raw message