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/10/19 00:47:16 UTC

svn commit: rev 55035 - in incubator/beehive/trunk/controls/test/src: drivers/org/apache/beehive/controls/test/driver/property units/org/apache/beehive/controls/test/java/property units/org/apache/beehive/controls/test/jpf/property

Author: jsong
Date: Mon Oct 18 15:47:15 2004
New Revision: 55035

Modified:
   incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java
   incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientAccessTest.java
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientImplTest.java
   incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java
Log:
Activate 6 more tests on controls' property.
Code reviewed by Alek. Checkin.tests pass on WinXP.


Modified: incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java	(original)
+++ incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java	Mon Oct 18 15:47:15 2004
@@ -26,17 +26,13 @@
 			report.setMessage("the control is NULL");
 		}
 		else
-		{   /*
-			control bean getter/setter is busted.
-			before it is fixed, just fail this test.
-
-			if (myControl.getGreetingGreetWord().equals(EXPECTED_GREETING))
+		{
+			if (myControl.getGreetWord().equals(EXPECTED_GREETING))
 				report.setStatus(Report.PASS);
-			else
+			else{
 				report.setStatus(Report.FAIL);
-			*/
-			report.setStatus(Report.FAIL);
-			report.setMessage("control bean getter/setter is broken. Check the latest dev status.");
+				report.setMessage("The property value from getter:"+myControl.getGreetWord());
+			}
 		}
 		return report;
 	}

Modified: incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java	(original)
+++ incubator/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java	Mon Oct 18 15:47:15 2004
@@ -27,19 +27,15 @@
 		}
 		else
 		{
-			/*
-			Before control bean getter/setter is fix, just fail this test
-
-			myControl.setGreetingGreetWord(EXPECTED_GREETING);
+			myControl.setGreetWord(EXPECTED_GREETING);
 			String s=myControl.sayHello();
 
 			if (s.equals(EXPECTED_GREETING))
 				report.setStatus(Report.PASS);
-			else
+			else{
 				report.setStatus(Report.FAIL);
-			*/
-			report.setStatus(Report.FAIL);
-			report.setMessage("control bean getter/setter is broken. Check the latest dev status.");
+				report.setMessage("The property from Getter:"+s);
+			}
 
 		}
 		return report;

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientAccessTest.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientAccessTest.java	(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientAccessTest.java	Mon Oct 18 15:47:15 2004
@@ -5,7 +5,7 @@
 import java.beans.Beans;
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.api.bean.ControlBean;
-import org.apache.beehive.controls.test.controls.property.SingleProperty2Bean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
 import org.apache.beehive.controls.test.driver.property.DriveClientAccess;
 import org.apache.beehive.test.tools.mantis.annotations.tch.Freq;
 import org.apache.beehive.test.tools.mantis.annotations.tch.Status;
@@ -14,8 +14,7 @@
 /**
  * Test accessing control's propertySet by control bean's getter/setter
  */
-@Freq("detailed")
-@Status("inactive")
+
 public class ClientAccessTest extends TestCase
 {
     public ClientAccessTest( String s ) { super( s ); }
@@ -24,7 +23,7 @@
 	 * A control that declares some propertySet in its control interface
 	 */
     @Control
-    public SingleProperty2Bean myControl;
+    public SinglePropertyBean myControl;
 
 	/** BUG: getter/setter in generated bean is busted. comment out all tests using getter/setter*/
 
@@ -32,6 +31,8 @@
      * Accesses property value by getter of the control bean instance.
      * The ccontrol bean is instantiated declaratively
      */
+	@Freq("detailed")
+	@Status("inactive")
     public void testGetterByDeclare() throws Exception
     {
 		/*
@@ -50,12 +51,13 @@
      * Accesses property value by getter og control bean instance.
      * The control bean is instantiated programmatically
      */
+	@Freq("checkin")
     public void testGetterByProgram() throws Exception
     {
-		/*
 		Report report=new Report();
-		SingleProperty2Bean sbean=(SingleProperty2Bean)Beans.instantiate(Thread.currentThread().getContextClassLoader(),
-                                 "org.apache.beehive.controls.test.controls.property.SingleProperty2Bean");
+		SinglePropertyBean sbean=(SinglePropertyBean)Beans.instantiate(
+			Thread.currentThread().getContextClassLoader(),
+            "org.apache.beehive.controls.test.controls.property.SinglePropertyBean");
 		DriveClientAccess driver=new DriveClientAccess();
 		driver.setControl(sbean);
 		report=driver.doTest();
@@ -63,7 +65,6 @@
 		if (!result.equals(Report.PASS))
 			fail(report.getMessage());
 
-		*/
     }
 
 }

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientImplTest.java
==============================================================================
--- incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientImplTest.java	(original)
+++ incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/ClientImplTest.java	Mon Oct 18 15:47:15 2004
@@ -14,8 +14,7 @@
 /**
  * A TestCase that tests accessing control's propertySet by both impl and client
  */
-@Freq("detailed")
-@Status("inactive")
+
 public class ClientImplTest extends TestCase
 {
     public ClientImplTest( String s ) { super( s ); }
@@ -35,6 +34,8 @@
      * retrieves the new value using control context on control's impl.
      * This method instantiates HelloBean by declaration
      */
+	@Freq("detailed")
+	@Status("inactive")
     public void testResetPropertyByDeclare() throws Exception
     {
 		/*
@@ -53,19 +54,19 @@
      * retrieves the new value using control context on control's impl.
      * This method instantiates HelloBean by program
      */
+	@Freq("checkin")
     public void testResetPropertyByProgram() throws Exception
     {
-		/*
 		Report report=new Report();
-		SingleProperty2Bean sbean=(SingleProperty2Bean)Beans.instantiate(Thread.currentThread().getContextClassLoader(),
-                                 "org.apache.beehive.controls.test.controls.property.SingleProperty2Bean");
+		SinglePropertyBean sbean=(SinglePropertyBean)Beans.instantiate(
+			Thread.currentThread().getContextClassLoader(),
+            "org.apache.beehive.controls.test.controls.property.SinglePropertyBean");
 		DriveClientImpl driver=new DriveClientImpl();
 		driver.setControl(sbean);
 		report=driver.doTest();
 		String result=report.getStatus();
 		if (!result.equals(Report.PASS))
 			fail(report.getMessage());
-		*/
     }
 
 }

Modified: incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/jpf/property/TestProperty.java
==============================================================================
--- 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	Mon Oct 18 15:47:15 2004
@@ -38,7 +38,6 @@
      * The control is instantiated declaratively on the pageflow
      */
 	@Freq("checkin")
-	@Status("inactive")
     public void testClientAccessByDeclare() throws Exception
     {
 		assertReport("/controlsWeb/property/client_access/Controller.jpf");
@@ -50,7 +49,6 @@
      * The control is instantiated programmatically on the pageflow
      */
 	@Freq("checkin")
-	@Status("inactive")
     public void testClientAccessByProgram() throws Exception
     {
 		assertReport("/controlsWeb/property/client_access2/Controller.jpf");
@@ -62,7 +60,6 @@
      * The control is instantiated declaratively on the pageflow
      */
 	@Freq("checkin")
-	@Status("inactive")
     public void testPropertySetterByDeclare() throws Exception
     {
 		assertReport("/controlsWeb/property/client_impl/Controller.jpf");
@@ -73,7 +70,6 @@
      * The control is instantiated programmatically on the pageflow
      */
 	@Freq("checkin")
-	@Status("inactive")
     public void testPropertySetterByProgram() throws Exception
     {
 		assertReport("/controlsWeb/property/client_impl2/Controller.jpf");