You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by Danno Ferrin <sh...@earthlink.net> on 2000/01/09 09:28:41 UTC
[PATCH] Get and Set Property
First, the positiveGetProperty test is invalid. It assumes that "Name" is
the property associated with "getName" and "setName". Committing this will
"break" the current tomcat, but I am posting a patch to that as well.
Second, four new tests are added (all negative), one each for getting and
setting a non existant property and one for getting a write only and one for
setting a read only property.
Diff -u does not put the contents of the eight new files in the patch, so I
am attaching them. You can see from the diff where they go.
---------------------------------------------------------------------------
?
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n
egativeGetPropNotProperty.java
?
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n
egativeGetPropNotRead.java
?
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n
egativeSetPropNotWrite.java
?
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n
egativeSetPropNotProperty.java
?
src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/negativeGetPropNo
tRead.jsp
?
src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/negativeGetPropNo
tProperty.jsp
?
src/server/jsp-tests/jsp/core_syntax/beantests/setProperty/negativeSetPropNo
tProperty.jsp
?
src/server/jsp-tests/jsp/core_syntax/beantests/setProperty/negativeSetPropNo
tWrite.jsp
Index:
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n
egativeGetProps.java
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/client/co
re_syntax/beantests/getProperty/negativeGetProps.java,v
retrieving revision 1.2
diff -u -r1.2 negativeGetProps.java
--- negativeGetProps.java 1999/11/09 20:38:51 1.2
+++ negativeGetProps.java 2000/01/09 07:55:09
@@ -75,7 +75,7 @@
TestResult testResult = null;
HttpURLConnection connection = null;
- setErrorCode (404);
+ setErrorCode (500);
try {
connection = getConnection();
Index:
src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n
egativePropSyntax.java
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/client/co
re_syntax/beantests/setProperty/negativePropSyntax.java,v
retrieving revision 1.2
diff -u -r1.2 negativePropSyntax.java
--- negativePropSyntax.java 1999/11/09 20:38:54 1.2
+++ negativePropSyntax.java 2000/01/09 07:55:10
@@ -75,7 +75,7 @@
TestResult testResult = null;
HttpURLConnection connection = null;
- setErrorCode (404);
+ setErrorCode (500);
try {
connection = getConnection();
Index: src/clients/org/apache/jcheck/jsp/resources/LocalStrings.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/resources
/LocalStrings.properties,v
retrieving revision 1.1
diff -u -r1.1 LocalStrings.properties
--- LocalStrings.properties 1999/11/09 23:10:18 1.1
+++ LocalStrings.properties 2000/01/09 07:55:14
@@ -61,7 +61,12 @@
negativePropSyntax.description = negativePropSyntax
+negativeSetPropNotProperty.description = negativeSetPropNotProperty
+negativeSetPropNotWrite.description = negativeSetPropNotWrite
+
negativeGetProps.description = negativeGetProps
+negativeGetPropNotProperty.description = negativeGetPropNotProperty
+negativeGetPropNotRead.description = negativeGetPropNotRead
positiveSetBooleanObj.description = positiveSetBooleanObj
positiveSetBooleanObj.goldenFile =
core_syntax/beantests/setProperty/positiveSetBooleanObj.html
Index: src/clients/org/apache/jcheck/props/jsp-tests.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/props/jsp-tes
ts.properties,v
retrieving revision 1.4
diff -u -r1.4 jsp-tests.properties
--- jsp-tests.properties 1999/11/09 20:39:16 1.4
+++ jsp-tests.properties 2000/01/09 07:55:16
@@ -155,8 +155,13 @@
org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeDupIDSess
ion1=core_syntax/beantests/useBean/negativeDupIDSession1.jsp
org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeInvalidCl
ass=core_syntax/beantests/useBean/negativeInvalidClass.jsp
org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeNoBody=co
re_syntax/beantests/useBean/negativeNoBody.jsp
-org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp
Syntax=core_syntax/beantests/setProperty/negativePropSyntax
-org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
rops=core_syntax/beantests/getProperty/negativeGetProps
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP
ropNotWrite=core_syntax/beantests/setProperty/negativeSetPropNotWrite.jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP
ropNotProperty=core_syntax/beantests/setProperty/negativeSetPropNotProperty.
jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp
Syntax=core_syntax/beantests/setProperty/negativePropSyntax.jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
rops=core_syntax/beantests/setProperty/negativeGetProps.jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
ropNotRead=core_syntax/beantests/getProperty/negativeGetPropNotRead.jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
ropNotProperty=core_syntax/beantests/getProperty/negativeGetPropNotProperty.
jsp
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
rops=core_syntax/beantests/getProperty/negativeGetProps.jsp
org.apache.jcheck.jsp.client.core_syntax.scripting.declaration.negativeDecla
rationSyn=core_syntax/scripting/declaration/negativeDeclarationSyn.jsp
org.apache.jcheck.jsp.client.core_syntax.directives.taglib.positiveTagLib=co
re_syntax/directives/taglib/positiveTagLib.jsp
org.apache.jcheck.jsp.client.core_syntax.directives.include.positiveInclude=
core_syntax/directives/include/positiveInclude.jsp
Index: src/conf/jsp-testlist.txt
===================================================================
RCS file: /home/cvspublic/jakarta-watchdog/src/conf/jsp-testlist.txt,v
retrieving revision 1.8
diff -u -r1.8 jsp-testlist.txt
--- jsp-testlist.txt 1999/12/16 01:48:58 1.8
+++ jsp-testlist.txt 2000/01/09 07:55:21
@@ -177,6 +177,10 @@
#org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeDupIDSes
sion1
#org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeInvalidC
lass
#org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeNoBody
-#org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativePro
pSyntax
-#org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGet
Props
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP
ropNotWrite
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP
ropNotProperty
+org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp
Syntax
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
rops
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
ropNotRead
+org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP
ropNotProperty
Index:
src/server/jsp-tests/WEB-INF/classes/core_syntax/beantests/getProperty/Strin
gBean.java
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/core_s
yntax/beantests/getProperty/StringBean.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 StringBean.java
--- StringBean.java 1999/10/09 00:42:00 1.1.1.1
+++ StringBean.java 2000/01/09 07:55:22
@@ -63,7 +63,7 @@
file://Declaring the variables
private String name="hello";
private int[] intAry={5,10,15};
-
+ private String bar="write-only";
/**
* Property 'name'
*/
@@ -88,4 +88,12 @@
this.intAry=i;
}
+ /**
+ * Property 'bar'
+ * String and Write only
+ */
+
+ public void setBar(String s) {
+ this.bar=s;
+ }
}
Index:
src/server/jsp-tests/WEB-INF/classes/core_syntax/beantests/setProperty/Setpr
opBean.java
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/core_s
yntax/beantests/setProperty/SetpropBean.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 SetpropBean.java
--- SetpropBean.java 1999/10/09 00:42:00 1.1.1.1
+++ SetpropBean.java 2000/01/09 07:55:22
@@ -65,6 +65,7 @@
private int num=0;
private String str;
private int[] intAry={15,20,35};
+ private String bar = "read-only";
/**
* Property 'Str'
@@ -113,5 +114,14 @@
public void setIntAry(int[] i){
this.intAry=i;
}
+
+ /**
+ * property 'bar'
+ * This is a read only property
+ */
+
+ public String getBar() {
+ return bar;
+ }
}
Index:
src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/positiveGetProps.
jsp
===================================================================
RCS file:
/home/cvspublic/jakarta-watchdog/src/server/jsp-tests/jsp/core_syntax/beante
sts/getProperty/positiveGetProps.jsp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 positiveGetProps.jsp
--- positiveGetProps.jsp 1999/10/09 00:43:15 1.1.1.1
+++ positiveGetProps.jsp 2000/01/09 07:55:29
@@ -9,6 +9,6 @@
**/ %>
<!-- Declaring the bean with out body -->
<jsp:useBean id="myBean" scope="request"
class="core_syntax.beantests.getProperty.StringBean" />
-<jsp:getProperty name="myBean" property="Name" />
+<jsp:getProperty name="myBean" property="name" />
</body>
</html>