You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by js...@apache.org on 2004/12/15 05:54:21 UTC

svn commit: r111946 - /incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java /incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf

Author: jsong
Date: Tue Dec 14 20:54:18 2004
New Revision: 111946

URL: http://svn.apache.org/viewcvs?view=rev&rev=111946
Log:
Add three more detailed tests on bound/constrained externally declared PropertySet.

Modified:
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java?view=diff&rev=111946&p1=incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java&r1=111945&p2=incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java&r2=111946
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java	(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java	Tue Dec 14 20:54:18 2004
@@ -79,8 +79,36 @@
      * Tests vetoing the change of a constrained property
      */
 	@Freq("checkin")
-    public void testVetoPropertyChange() throws Exception
+    public void testVetoChangeOnConstrainedProperty() throws Exception
     {
-		assertReport("/controlsWeb/property/veto/Controller.jpf");
+		assertReport("/controlsWeb/property/veto/testVetoChangeOnConstrainedProperty.do");
     }
-}
+
+    /**
+     * Tests vetoing the change of an unconstrained property
+     */
+	@Freq("detailed")
+    public void testVetoChangeOnUnConstrainedProperty() throws Exception
+    {
+		assertReport("/controlsWeb/property/veto/testVetoChangeOnUnConstrainedProperty.do");
+    }
+
+    /**
+     * Tests vetoing the change of a constrained property, the PropertySet is declared externally
+     */
+	@Freq("detailed")
+    public void testVetoChangeOnConstrainedExtProperty() throws Exception
+    {
+		assertReport("/controlsWeb/property/veto/testVetoChangeOnConstrainedExtProperty.do");
+    }
+
+    /**
+     * Tests vetoing the change of an unconstrained property, the PropertySet is declared externally
+     */
+	@Freq("detailed")
+    public void testVetoChangeOnUnConstrainedExtProperty() throws Exception
+    {
+		assertReport("/controlsWeb/property/veto/testVetoChangeOnUnConstrainedExtProperty.do");
+    }
+
+}
\ No newline at end of file

Modified: incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf?view=diff&rev=111946&p1=incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf&r1=111945&p2=incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf&r2=111946
==============================================================================
--- incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf	(original)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/veto/Controller.jpf	Tue Dec 14 20:54:18 2004
@@ -39,7 +39,7 @@
 {
     @Control
     public BoundPropertyControlBean myControl;
-  
+
     /**
      * @jpf:action
      */
@@ -48,10 +48,86 @@
     protected Forward begin(){
     	
     	Report report=new Report();
+    	report.setStatus(Report.FAIL);
+    	report.setMessage("This method does not do any test. Just a dummy method to Begin.");   	
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward testVetoChangeOnConstrainedProperty(){
+    	
+    	Report report=new Report();
 	DrivePropertyInfo driver=new DrivePropertyInfo();
 	try{
 		driver.setControl(myControl);
 		report=driver.doVetoChangeOnConstrainedProperty();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward testVetoChangeOnUnConstrainedProperty(){
+    	
+    	Report report=new Report();
+	DrivePropertyInfo driver=new DrivePropertyInfo();
+	try{
+		driver.setControl(myControl);
+		report=driver.doVetoChangeOnUnConstrainedProperty();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward testVetoChangeOnConstrainedExtProperty(){
+    	
+    	Report report=new Report();
+	DrivePropertyInfo driver=new DrivePropertyInfo();
+	try{
+		driver.setControl(myControl);
+		report=driver.doVetoChangeOnConstrainedExtProperty();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward testVetoChangeOnUnConstrainedExtProperty(){
+    	
+    	Report report=new Report();
+	DrivePropertyInfo driver=new DrivePropertyInfo();
+	try{
+		driver.setControl(myControl);
+		report=driver.doVetoChangeOnUnConstrainedExtProperty();
         }
         catch(Exception e){