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/09/17 02:36:42 UTC

svn commit: rev 46224 - in incubator/beehive/trunk/controls/test: src/controls/org/apache/beehive/controls/test/controls/composition src/units/org/apache/beehive/controls/test/jpf/extension webapps/controlsWeb/extension

Author: jsong
Date: Thu Sep 16 17:36:41 2004
New Revision: 46224

Modified:
   incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java
   incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControlImpl.jcs
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/extension/TestSubControl.java
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/extension/Controller.jpf
Log:
Adding more tests on pageflow invoking controls.


Modified: incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java	(original)
+++ incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java	Thu Sep 16 17:36:41 2004
@@ -6,16 +6,12 @@
 
 
 /**
- * A control interface designed to test control composition
+ * A control interface to test control composition.
  */
 @ControlInterface
 public interface OuterControl
 {
-	/*
-	 * BUG: can not refer to the bean class
-	 *
-	 * Must a outer control declare its inner control by bean or interface?
-	 */
+
 	public InnerControlBean getDeclaredNestedControl();
 	public InnerControlBean getDeclaredNestedControl2();
 	public InnerControlBean instantiateNestedControlProgrammatically();

Modified: incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControlImpl.jcs
==============================================================================
--- incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControlImpl.jcs	(original)
+++ incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/composition/OuterControlImpl.jcs	Thu Sep 16 17:36:41 2004
@@ -9,9 +9,8 @@
 import org.apache.beehive.controls.test.controls.composition.InnerControlBean;
 
 /**
- * A control implementation designed to test control composition
- * This control implementation make two instances of nested control
- * be declaration.
+ * A control implementation to test control composition.
+ * Makes two instances of nested control be declaration.
  */
 @ControlImplementation
 public class OuterControlImpl implements OuterControl

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/extension/TestSubControl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/extension/TestSubControl.java	(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/extension/TestSubControl.java	Thu Sep 16 17:36:41 2004
@@ -54,6 +54,7 @@
     /**
      * Tests getting an inherited property by control context on sub control
      * implementation class.
+     * The sub control is instantiated declaratively.
      */
 
 	@Freq("checkin")
@@ -62,8 +63,21 @@
 		assertReport("/controlsWeb/extension/testGetInheritedPropertyByContext.do");
 	}
 
+    /**
+     * Tests getting an inherited property by control context on sub control
+     * implementation class.
+     * The sub control is instantiated programmatically.
+     */
+
+	@Freq("checkin")
+    public void testGetInheritedPropertyByContextP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetInheritedPropertyByContextP.do");
+	}
+
 	/**
      * Tests getting an inherited property by getter on sub control bean class.
+     * The sub control is instantiated declaratively.
      * deactivated for CR190164
 	 */
 	@Freq("detailed")
@@ -74,7 +88,20 @@
     }
 
 	/**
+     * Tests getting an inherited property by getter on sub control bean class.
+     * The sub control is instantiated programmatically.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+    @Status("inactive")
+    public void testGetInheritedPropertyByGetterP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetInheritedPropertyByGetterP.do");
+    }
+
+	/**
      * Tests setting an inherited property by setter on sub control bean class.
+     * The sub control is instantiated decalratively.
      * deactivated for CR190164
 	 */
 	@Freq("detailed")
@@ -85,9 +112,94 @@
     }
 
 	/**
+     * Tests setting an inherited property by setter on sub control bean class.
+     * The sub control is instantiated programmatically.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+    @Status("inactive")
+    public void testSetInheritedPropertyBySetterP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testSetInheritedPropertyBySetterP.do");
+    }
+
+    /**
+     * Tests getting an extended property by control context on sub control.
+     * The sub control is instantiated declaratively.
+     * implementation class.
+     */
+
+	@Freq("checkin")
+    public void testGetExtendedPropertyByContext() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetExtendedPropertyByContext.do");
+	}
+
+    /**
+     * Tests getting an extended property by control context on sub control.
+     * The sub control is instantiated programmatically.
+     * implementation class.
+     */
+
+	@Freq("checkin")
+    public void testGetExtendedPropertyByContextP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetExtendedPropertyByContextP.do");
+	}
+
+	/**
+     * Tests getting an extended property by getter on sub control bean class.
+     * The sub control is instantiated declaratively.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+	@Status("inactive")
+    public void testGetExtendedPropertyByGetter() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetExtendedPropertyByGetter.do");
+    }
+
+	/**
+     * Tests getting an extended property by getter on sub control bean class.
+     * The sub control is instantiated programmatically.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+	@Status("inactive")
+    public void testGetExtendedPropertyByGetterP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetExtendedPropertyByGetterP.do");
+    }
+
+	/**
+     * Tests setting an extended property by setter on sub control bean class.
+     * The sub control is instantiated declaratively.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+	@Status("inactive")
+    public void testSetExtendedPropertyBySetter() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testSetExtendedPropertyBySetter.do");
+    }
+
+	/**
+     * Tests setting an extended property by setter on sub control bean class.
+     * The sub control is instantiated programmatically.
+     * deactivated for CR190164
+	 */
+	@Freq("detailed")
+	@Status("inactive")
+    public void testSetExtendedPropertyBySetterP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testSetExtendedPropertyBySetterP.do");
+    }
+
+	/**
      * The value of an inherited property can by reset on subcontrol interface.
      * This test verifies the reconfigured property is assigned to a new value
      * when retrieved from control context on the subcontrol implementation class.
+     * The sub control is instantiated declaratively.
 	 */
 	@Freq("detailed")
     public void testGetReconfiguredPropertyByContext() throws Exception
@@ -98,8 +210,21 @@
 	/**
      * The value of an inherited property can by reset on subcontrol interface.
      * This test verifies the reconfigured property is assigned to a new value
+     * when retrieved from control context on the subcontrol implementation class.
+     * The sub control is instantiated programmatically.
+	 */
+	@Freq("detailed")
+    public void testGetReconfiguredPropertyByContextP() throws Exception
+    {
+		assertReport("/controlsWeb/extension/testGetReconfiguredPropertyByContextP.do");
+    }
+
+	/**
+     * The value of an inherited property can by reset on subcontrol interface.
+     * This test verifies the reconfigured property is assigned to a new value
      * when retrieved from getter method on sub control bean class.
-     * deactivated for CR190164
+     * deactivated for CR190164.
+     * The sub control is instantiated declaratively.
 	 */
 	@Freq("detailed")
 	@Status("inactive")
@@ -110,50 +235,45 @@
 
 	/**
      * The value of an inherited property can by reset on subcontrol interface.
-     * This test tries to set the reconfigured property to a new value using
-     * the setter method on sub control bean class.
-     * deactivated for CR190164
+     * This test verifies the reconfigured property is assigned to a new value
+     * when retrieved from getter method on sub control bean class.
+     * deactivated for CR190164.
+     * The sub control is instantiated programmatically.
 	 */
 	@Freq("detailed")
 	@Status("inactive")
-    public void testSetReconfiguredPropertyBySetter() throws Exception
+    public void testGetReconfiguredPropertyByGetterP() throws Exception
     {
-		assertReport("/controlsWeb/extension/testSetReconfiguredPropertyBySetter.do");
+		assertReport("/controlsWeb/extension/testGetReconfiguredPropertyByGetterP.do");
     }
 
-    /**
-     * Tests getting an extended property by control context on sub control
-     * implementation class.
-     */
-
-	@Freq("checkin")
-    public void testGetExtendedPropertyByContext() throws Exception
-    {
-		assertReport("/controlsWeb/extension/testGetExtendedPropertyByContext.do");
-	}
-
 	/**
-     * Tests getting an extended property by getter on sub control bean class.
-     * deactivated for CR190164
+     * The value of an inherited property can by reset on subcontrol interface.
+     * This test tries to set the reconfigured property to a new value using
+     * the setter method on sub control bean class.
+     * deactivated for CR190164.
+     * The sub control is instantiated decalratively
 	 */
 	@Freq("detailed")
 	@Status("inactive")
-    public void testGetExtendedPropertyByGetter() throws Exception
+    public void testSetReconfiguredPropertyBySetter() throws Exception
     {
-		assertReport("/controlsWeb/extension/testGetExtendedPropertyByGetter.do");
+		assertReport("/controlsWeb/extension/testSetReconfiguredPropertyBySetter.do");
     }
 
 	/**
-     * Tests setting an extended property by setter on sub control bean class.
-     * deactivated for CR190164
+     * The value of an inherited property can by reset on subcontrol interface.
+     * This test tries to set the reconfigured property to a new value using
+     * the setter method on sub control bean class.
+     * deactivated for CR190164.
+     * The sub control is instantiated programmatically
 	 */
 	@Freq("detailed")
 	@Status("inactive")
-    public void testSetExtendedPropertyBySetter() throws Exception
+    public void testSetReconfiguredPropertyBySetterP() throws Exception
     {
-		assertReport("/controlsWeb/extension/testSetExtendedPropertyBySetter.do");
+		assertReport("/controlsWeb/extension/testSetReconfiguredPropertyBySetterP.do");
     }
-
 	/**
      * Tests invoking a method that is overwritten by subcontrol.
 	 */

Modified: incubator/beehive/trunk/controls/test/webapps/controlsWeb/extension/Controller.jpf
==============================================================================
--- incubator/beehive/trunk/controls/test/webapps/controlsWeb/extension/Controller.jpf	(original)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/extension/Controller.jpf	Thu Sep 16 17:36:41 2004
@@ -147,6 +147,28 @@
 
     @Jpf.Action(
         )
+    protected Forward testGetInheritedPropertyByContextP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetInheritedPropertyByContext();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    @Jpf.Action(
+        )
     protected Forward testGetInheritedPropertyByGetter(){
     	
 	DriveSubControl driver=new DriveSubControl();
@@ -156,6 +178,30 @@
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
+
+    @Jpf.Action(
+        )
+    protected Forward testGetInheritedPropertyByGetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetInheritedPropertyByGetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+
     @Jpf.Action(
         )
     protected Forward testSetInheritedPropertyBySetter(){
@@ -169,68 +215,225 @@
 
     @Jpf.Action(
         )
-    protected Forward testGetReconfiguredPropertyByContext(){
+    protected Forward testSetInheritedPropertyBySetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doSetInheritedPropertyBySetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+
+
+    @Jpf.Action(
+        )
+    protected Forward testGetExtendedPropertyByContext(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doGetReconfiguredPropertyByContext();
+	Report report=driver.doGetExtendedPropertyByContext();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
     @Jpf.Action(
         )
-    protected Forward testGetReconfiguredPropertyByGetter(){
+    protected Forward testGetExtendedPropertyByContextP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetExtendedPropertyByContext();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+    
+    @Jpf.Action(
+        )
+    protected Forward testGetExtendedPropertyByGetter(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doGetReconfiguredPropertyByGetter();
+	Report report=driver.doGetExtendedPropertyByGetter();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
+
     @Jpf.Action(
         )
-    protected Forward testSetReconfiguredPropertyBySetter(){
+    protected Forward testGetExtendedPropertyByGetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetExtendedPropertyByGetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+    
+    @Jpf.Action(
+        )
+    protected Forward testSetExtendedPropertyBySetter(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doSetReconfiguredPropertyBySetter();
+	Report report=driver.doSetExtendedPropertyBySetter();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
     @Jpf.Action(
         )
-    protected Forward testGetExtendedPropertyByContext(){
+    protected Forward testSetExtendedPropertyBySetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doSetExtendedPropertyBySetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    @Jpf.Action(
+        )
+    protected Forward testGetReconfiguredPropertyByContext(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doGetExtendedPropertyByContext();
+	Report report=driver.doGetReconfiguredPropertyByContext();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
-    
+
     @Jpf.Action(
         )
-    protected Forward testGetExtendedPropertyByGetter(){
+    protected Forward testGetReconfiguredPropertyByContextP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetReconfiguredPropertyByContext();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    @Jpf.Action(
+        )
+    protected Forward testGetReconfiguredPropertyByGetter(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doGetExtendedPropertyByGetter();
+	Report report=driver.doGetReconfiguredPropertyByGetter();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
-    
+
     @Jpf.Action(
         )
-    protected Forward testSetExtendedPropertyBySetter(){
+    protected Forward testGetReconfiguredPropertyByGetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doGetReconfiguredPropertyByGetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    @Jpf.Action(
+        )
+    protected Forward testSetReconfiguredPropertyBySetter(){
     	
 	DriveSubControl driver=new DriveSubControl();
 	driver.setControl(subcontrol);
-	Report report=driver.doSetExtendedPropertyBySetter();
+	Report report=driver.doSetReconfiguredPropertyBySetter();
 	
         return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+    @Jpf.Action(
+        )
+    protected Forward testSetReconfiguredPropertyBySetterP(){
+    	
+	DriveSubControl driver=new DriveSubControl();
+	Report report=new Report();
+	try{
+		SubControlBean subbean=(SubControlBean)java.beans.Beans.instantiate(
+			Thread.currentThread().getContextClassLoader() ,
+			"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+		driver.setControl(subbean);
+		report=driver.doSetReconfiguredPropertyBySetter();
+        }
+        catch(Exception e){
+		
+		report.setStatus(Report.FAIL);
+		report.setExceptionStack(e);
+        }
+
+	return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
     /*