beehive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From js...@apache.org
Subject svn commit: rev 43639 - in incubator/beehive/trunk/controls/test: src/controls/org/apache/beehive/controls/test/controls/extension src/units/org/apache/beehive/controls/test/java/composition src/units/org/apache/beehive/controls/test/java/extension src/units/org/apache/beehive/controls/test/java/property src/units/org/apache/beehive/controls/test/jpf/extension src/units/org/apache/beehive/controls/test/jpf/instantiate webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/extension
Date Fri, 10 Sep 2004 00:26:49 GMT
Author: jsong
Date: Thu Sep  9 17:26:49 2004
New Revision: 43639

Modified:
   incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
   incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/composition/ProgrammaticTest.java
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/extension/SubControlTest.java
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ImplAccessTest.java
   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/instantiate/TestInstantiate.java
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/extension/DriveSubControl.java
Log:
Update controls tests. Activate more tests as more control features are supported.


Modified: incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
(original)
+++ incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
Thu Sep  9 17:26:49 2004
@@ -29,4 +29,5 @@
 
     public String hello2();
     public String accessInheritedProperty();
+    public String getExtendedPropertyByContext();
 }

Modified: incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
==============================================================================
--- incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
(original)
+++ incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
Thu Sep  9 17:26:49 2004
@@ -25,4 +25,11 @@
         
         return where.Position();    
     }
+
+    public String getExtendedPropertyByContext(){
+
+        SubControl.NewProperty newproperty=(SubControl.NewProperty)context.getControlPropertySet(SubControl.NewProperty.class);
+        
+        return newproperty.Message();    
+    }
 }

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/composition/ProgrammaticTest.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/composition/ProgrammaticTest.java
(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/composition/ProgrammaticTest.java
Thu Sep  9 17:26:49 2004
@@ -94,8 +94,10 @@
     /**
      * Tests reconfigured property.
      * Outer control reconfigures the inner control's property when instantiating it
+     * Deactivated by CR190302
      */
     @Freq("detailed")
+    @Status("inactive")
     public void testReconfiguredProperty() throws Exception
     {
 		Assert.assertNotNull(outerControl);
@@ -108,8 +110,10 @@
     /**
      * Tests outer control receiving events from nested control using
      * EventHandler
+     * This is deactivated, as declarative instantiating control in java is not supported
      */
     @Freq("detailed")
+    @Status("inactive")
     public void testEventHandler() throws Exception
     {
 		Assert.assertNotNull(outerControl);

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/extension/SubControlTest.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/extension/SubControlTest.java
(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/extension/SubControlTest.java
Thu Sep  9 17:26:49 2004
@@ -336,12 +336,14 @@
      * The value is retrieved by control context.
      * The subcontrol is instantiated declaratively.
      */
-	@Freq("detailed")
-	@Status("inactive")
+	@Freq("checkin")
     public void testGetExtendedPropertyByContext() throws Exception
     {
-		//one new method needs to be added on SubControl
-		//getNewPropertyByContext()
+		SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate( Thread.currentThread().getContextClassLoader()
,
+				"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+
+		Assert.assertNotNull(sub);
+		Assert.assertEquals("New Property Declared by Sub Control",sub.getExtendedPropertyByContext());
     }
 
     /**

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ImplAccessTest.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ImplAccessTest.java
(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ImplAccessTest.java
Thu Sep  9 17:26:49 2004
@@ -52,7 +52,7 @@
      * By invoking sayHello method, the property value is retrieved via control context.
      * The control bean is instantiated programmatically.
      */
-	@Freq("detailed")
+	@Freq("checkin")
     public void testContextAccessByProgram() throws Exception
     {
 		//Report report =new Report();

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  9 17:26:49 2004
@@ -64,8 +64,10 @@
 
 	/**
      * Tests getting an inherited property by getter on sub control bean class.
+     * deactivated for CR190164
 	 */
 	@Freq("detailed")
+    @Status("inactive")
     public void testGetInheritedPropertyByGetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testGetInheritedPropertyByGetter.do");
@@ -73,8 +75,10 @@
 
 	/**
      * Tests setting an inherited property by setter on sub control bean class.
+     * deactivated for CR190164
 	 */
 	@Freq("detailed")
+    @Status("inactive")
     public void testSetInheritedPropertyBySetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testSetInheritedPropertyBySetter.do");
@@ -95,8 +99,10 @@
      * 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
 	 */
 	@Freq("detailed")
+	@Status("inactive")
     public void testGetReconfiguredPropertyByGetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testGetReconfiguredPropertyByGetter.do");
@@ -106,8 +112,10 @@
      * 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
 	 */
 	@Freq("detailed")
+	@Status("inactive")
     public void testSetReconfiguredPropertyBySetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testSetReconfiguredPropertyBySetter.do");
@@ -118,7 +126,7 @@
      * implementation class.
      */
 
-	@Freq("detailed")
+	@Freq("checkin")
     public void testGetExtendedPropertyByContext() throws Exception
     {
 		assertReport("/controlsWeb/extension/testGetExtendedPropertyByContext.do");
@@ -126,8 +134,10 @@
 
 	/**
      * Tests getting an extended property by getter on sub control bean class.
+     * deactivated for CR190164
 	 */
 	@Freq("detailed")
+	@Status("inactive")
     public void testGetExtendedPropertyByGetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testGetExtendedPropertyByGetter.do");
@@ -135,8 +145,10 @@
 
 	/**
      * Tests setting an extended property by setter on sub control bean class.
+     * deactivated for CR190164
 	 */
 	@Freq("detailed")
+	@Status("inactive")
     public void testSetExtendedPropertyBySetter() throws Exception
     {
 		assertReport("/controlsWeb/extension/testSetExtendedPropertyBySetter.do");

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/instantiate/TestInstantiate.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/instantiate/TestInstantiate.java
(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/instantiate/TestInstantiate.java
Thu Sep  9 17:26:49 2004
@@ -34,7 +34,7 @@
      * Tests declaratively instantiating a custom control with propertySet
      */
 
-	@Freq("detailed")
+	@Freq("checkin")
     public void testDeclareWithProperty() throws Exception
     {
 		assertReport("/controlsWeb/instantiate/declarewithproperty/Controller.jpf");

Modified: incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
(original)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
Thu Sep  9 17:26:49 2004
@@ -30,4 +30,5 @@
 
     public String hello2();
     public String accessInheritedProperty();
+    public String getExtendedPropertyByContext();
 }

Modified: incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
==============================================================================
--- incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
(original)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
Thu Sep  9 17:26:49 2004
@@ -25,4 +25,11 @@
         
         return where.Position();    
     }
+    public String getExtendedPropertyByContext(){
+
+        SubControl.NewProperty newproperty=(SubControl.NewProperty)context.getControlPropertySet(SubControl.NewProperty.class);
+        
+        return newproperty.Message();    
+    
+    }
 }

Modified: incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/extension/DriveSubControl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/extension/DriveSubControl.java
(original)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/extension/DriveSubControl.java
Thu Sep  9 17:26:49 2004
@@ -224,15 +224,14 @@
 		}
 		else {
 
-			/* BUG: extended method declared on sub control could not be invoked
-			 * should add a new method on SubControl to allow getting extended
-			 * property via control context.
-			 *
-			 * Just fail this test until the bug is fixed.
-			 */
-			report.setStatus(Report.FAIL);
-			report.setMessage("Bug:extended method could not be invoked."+
-			" Check the latest development please.");
+			String new_property_value=myControl.getExtendedPropertyByContext();
+
+			if (new_property_value.equals("New Property Declared by Sub Control"))
+				report.setStatus(Report.PASS);
+			else{
+				report.setStatus(Report.FAIL);
+				report.setMessage("Extended property retrieved from context:"+new_property_value);
+			}
 		}
 		return report;
 	}

Mime
View raw message