Author: jsong
Date: Thu Aug 12 22:57:12 2004
New Revision: 36320
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Event2Listener.java
Removed:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/root.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/extension/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/instantiate/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/test.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/root.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/root.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/root.xml
incubator/beehive/trunk/controls/test/src/units/org/apache/root.xml
incubator/beehive/trunk/controls/test/src/units/org/root.xml
incubator/beehive/trunk/controls/test/src/units/root.xml
Modified:
incubator/beehive/trunk/controls/test/build.xml
incubator/beehive/trunk/controls/test/common/path.properties
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/ContextTest.java
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/GetServiceTest.java
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/LifeCycleTest.java
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/EventHandlerTest.java
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/ListenerTest.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/instantiate/TestInstantiate.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/java/property/ImplAccessTest.java
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/PropTest.java
Log:
Add mantis annotations to junit tests;
Update controls/test/build.xml and add mantis.jar to junit build classpath;
remove pregenerated root.xml and test.xml.
Modified: incubator/beehive/trunk/controls/test/build.xml
==============================================================================
--- incubator/beehive/trunk/controls/test/build.xml (original)
+++ incubator/beehive/trunk/controls/test/build.xml Thu Aug 12 22:57:12 2004
@@ -147,6 +147,7 @@
failonerror="true">
<classpath>
<pathelement location="${milton.jar}"/>
+ <pathelement location="${mantis.jar}"/>
<pathelement path="${build.tests.driver}"/>
</classpath>
</javac>
Modified: incubator/beehive/trunk/controls/test/common/path.properties
==============================================================================
--- incubator/beehive/trunk/controls/test/common/path.properties
(original)
+++ incubator/beehive/trunk/controls/test/common/path.properties Thu Aug
12 22:57:12 2004
@@ -17,6 +17,7 @@
tch.xbean.jar=${tch.home}/xbean-1.0.2.jar
milton.jar=${controls.test.infra.dir}/milton/milton.jar
+mantis.jar=${controls.test.infra.dir}/mantis/mantis.jar
crimson.jar=${external.dir}/crimson/crimson-1.1.jar
jakarta.jar=${external.dir}/jakarta/jakarta-regexp-1.2.jar
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/ContextTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/ContextTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/ContextTest.java
Thu Aug 12 22:57:12 2004
@@ -2,17 +2,18 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-
import java.beans.Beans;
import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.test.controls.context.BaseContextBean;
import org.apache.beehive.controls.test.driver.context.BaseContextBeanDriver;
-
import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+
/**
* A TestCase that tests controls context services
*/
[EMAIL PROTECTED]("checkin")
public class ContextTest extends TestCase
{
public ContextTest( String s ) { super( s ); }
@@ -34,7 +35,8 @@
*/
public void testContextEventSingle() throws Exception
{
- BaseContextBean contextBean =
(BaseContextBean)createTestBean("org.apache.beehive.controls.test.controls.context.BaseContextBean");
+ BaseContextBean contextBean = (BaseContextBean)createTestBean(
+
"org.apache.beehive.controls.test.controls.context.BaseContextBean");
BaseContextBeanDriver driver=new BaseContextBeanDriver();
Report report=driver.testSingleBean(contextBean);
@@ -52,7 +54,8 @@
*/
public void testContextEventMultiple() throws Exception
{
- BaseContextBean contextBean =
(BaseContextBean)createTestBean("org.apache.beehive.controls.test.controls.context.BaseContextBean");
+ BaseContextBean contextBean = (BaseContextBean)createTestBean(
+
"org.apache.beehive.controls.test.controls.context.BaseContextBean");
BaseContextBeanDriver driver=new BaseContextBeanDriver();
Report report=driver.testMultipleEvents(contextBean);
@@ -70,8 +73,10 @@
*/
public void testContextEventParallel() throws Exception
{
- BaseContextBean contextBean1 =
(BaseContextBean)createTestBean("org.apache.beehive.controls.test.controls.context.BaseContextBean");
- BaseContextBean contextBean2 =
(BaseContextBean)createTestBean("org.apache.beehive.controls.test.controls.context.BaseContextBean");
+ BaseContextBean contextBean1 = (BaseContextBean)createTestBean(
+
"org.apache.beehive.controls.test.controls.context.BaseContextBean");
+ BaseContextBean contextBean2 = (BaseContextBean)createTestBean(
+
"org.apache.beehive.controls.test.controls.context.BaseContextBean");
BaseContextBeanDriver driver=new BaseContextBeanDriver();
Report
report=driver.testParallelEvents(contextBean1,contextBean2);
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/GetServiceTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/GetServiceTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/GetServiceTest.java
Thu Aug 12 22:57:12 2004
@@ -9,11 +9,12 @@
import org.apache.beehive.controls.api.bean.Control;
import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.test.controls.context.ServiceGetterBean;
-
+import org.apache.beehive.mantis.annotations.tch.Freq;
/**
* A TestCase that tests accessing available services via control context
*/
[EMAIL PROTECTED]("checkin")
public class GetServiceTest extends TestCase
{
public GetServiceTest( String s ) { super( s ); }
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/LifeCycleTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/LifeCycleTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/LifeCycleTest.java
Thu Aug 12 22:57:12 2004
@@ -6,13 +6,13 @@
import org.apache.beehive.controls.api.bean.Control;
import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.test.controls.contextevent.RecorderBean;
-
+import org.apache.beehive.mantis.annotations.tch.Freq;
+import org.apache.beehive.mantis.annotations.tch.Status;
/**
* A TestCase that tests control's context event by listening to and recording
controls'
* life cycle event
*/
-
public class LifeCycleTest extends TestCase
{
/*
@@ -27,6 +27,7 @@
* Tests control impl listening to its lifecycle events.
* The control is instantiated by declaration
*/
+ @Freq("checkin")
public void testRecordedByImplDeclaration() throws Exception
{
Assert.assertNotNull(myRecorder);
@@ -38,6 +39,7 @@
* Tests control impl listening to its lifecycle events.
* The control is instantiated programmatically
*/
+ @Freq("checkin")
public void testRecordedByImplProgram() throws Exception
{
RecorderBean recorderbean=(RecorderBean)Beans.instantiate(
@@ -50,6 +52,8 @@
/**
* Tests listening to control's lifecycle events by registering a listener
*/
+ @Freq("detail")
+ @Status("inactive")
public void testRecordFromBeanInstance() throws Exception
{
/**Bug: CR190273
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/EventHandlerTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/EventHandlerTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/EventHandlerTest.java
Thu Aug 12 22:57:12 2004
@@ -8,10 +8,12 @@
import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.api.events.EventHandler;
import org.apache.beehive.controls.test.controls.event.HelloBean;
+import org.apache.beehive.mantis.annotations.tch.Freq;
/**
* A TestCase that tests receiving events from a control by @EventHandler
*/
[EMAIL PROTECTED]("checkin")
public class EventHandlerTest extends TestCase
{
private boolean event1Received=false;
@@ -31,11 +33,12 @@
eventName="method1")
public void myHelloBeanMessageHandler()
{
- // Code implementing onMessage event handler
+ // Invoked with event is received
+ /*
System.out.println("***************************************");
- System.out.println("event receive! nothing received");
+ System.out.println("EventSet1 receive!");
System.out.println("***************************************");
-
+ */
event1Received=true;
}
@@ -44,28 +47,28 @@
@EventHandler (field="myHelloBean", eventSet= HelloBean.EventSet2.class,
eventName="set2Method2")
public void myHelloBeanMessageHandler2()
{
- // Code implementing onMessage event handler
+ // Invoked when event is received
+ /*
System.out.println("***************************************************");
- System.out.println("event2 receive!");
+ System.out.println("EventSet2 receive!");
System.out.println("***************************************************");
-
+ */
event2Received=true;
}
/**
- * 1. Delete the files that might exist
- * 2. Invoke a method on the control and wait for the event
+ * Triggers the events and waits for the arrivals of the events
*/
public void testHandlerReceiveEvents() throws Exception
{
Assert.assertNotNull(myHellobean);
-
- System.out.println("*********************************");
- System.out.println("****** event invoked ******");
- System.out.println("*********************************");
-
+ /*
+ System.out.println("************************************");
+ System.out.println("****** events triggered ******");
+ System.out.println("************************************");
+ */
/* Invokes the method on the control while will trigger the
events*/
try{
myHellobean.triggerEvents();
@@ -74,7 +77,6 @@
Thread.currentThread().sleep(1000);
/*Verified result*/
-
Assert.assertEquals(true,event1Received);
Assert.assertEquals(true,event2Received);
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/ListenerTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/ListenerTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/ListenerTest.java
Thu Aug 12 22:57:12 2004
@@ -7,11 +7,13 @@
import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.test.controls.event.Hello;
import org.apache.beehive.controls.test.controls.event.HelloBean;
+import org.apache.beehive.mantis.annotations.tch.Freq;
/**
* A Testcase that tests receiving events from a control with an inner class or
* an instance of listener class.
*/
[EMAIL PROTECTED]("checkin")
public class ListenerTest extends TestCase
{
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 Aug 12 22:57:12 2004
@@ -2,11 +2,14 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-
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.extension.SubControlBean;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+import org.apache.beehive.mantis.annotations.tch.Status;
+
+
/**
* A TeseCase that tests control inheritance by instantiating a subcontrol and
invoking the methods
@@ -27,6 +30,7 @@
/**
* Tests invoking a method inherited by the subcontrol
*/
+ @Freq("checkin")
public void testInheritedMethod() throws Exception
{
Assert.assertNotNull(subcontrol);
@@ -39,6 +43,7 @@
* Tests invoking a method inherited by the subcontrol.
* The subcontrol is instantiated programmically
*/
+ @Freq("checkin")
public void testInheritedMethod2() throws Exception
{
SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
@@ -51,6 +56,7 @@
/**
* Tests invoking a method declared on the subcontrol
*/
+ @Freq("detail")
public void testExtendedMethod() throws Exception
{
Assert.assertNotNull(subcontrol);
@@ -63,6 +69,7 @@
* Tests invoking a method declared on the subcontrol
* The subcontrol is instantiated programmically
*/
+ @Freq("detail")
public void testExtendedMethod2() throws Exception
{
SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
@@ -78,6 +85,7 @@
* The property is retrieved via control context.
* The subcontrol is instantiated declaratively
*/
+ @Freq("detail")
public void testGettingInheritedPropertyByContext() throws Exception
{
Assert.assertNotNull(subcontrol);
@@ -91,6 +99,7 @@
* The property is retrieved via control context.
* The subcontrol is instantiated programmatically
*/
+ @Freq("detail")
public void testGettingInheritedPropertyByContext2() throws Exception
{
SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
@@ -107,12 +116,16 @@
* Tests getting an inherited property from a subcontrol instance.
* The property is retrieved via getter.
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGettingInheritedPropertyByGetter() throws Exception
{
+ /*
Assert.assertNotNull(subcontrol);
String s=subcontrol.getWhereaboutPosition();
Assert.assertEquals("In_ExtensibleControl_Interface",s);
+ */
}
@@ -120,98 +133,121 @@
* Tests getting an inherited property from a subcontrol instance
* The property is retrieved via getter.
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGettingInheritedPropertyByGetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals("In_ExtensibleControl_Interface",sub.getWhereaboutPosition());
-
+ */
}
/**
* Tests setting an inherited property from a subcontrol instance.
* The property is retrieved via getter.
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSettingInheritedPropertyBySetter() throws Exception
{
+ /*
Assert.assertNotNull(subcontrol);
String s=subcontrol.setWhereaboutPosition("new position");
Assert.assertEquals("In_ExtensibleControl_Interface",s);
-
+ */
}
/**
* Tests setting an inherited property from a subcontrol instance
* The property is retrieved via getter.
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSettingInheritedPropertyBySetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals("In_ExtensibleControl_Interface",sub.getWhereaboutPosition());
-
+ */
}
/**
* Tests getting a reconfigured inherited property.(The property is
declared on super control
* but reconfigured on sub control interface).
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetReconfiguredPropertyByGetter() throws Exception
{
+ /*
String s=subcontrol.getWhereAboutLayer();
Assert.assertEquals(s,"On_SubControl_Interface_Layer");
-
+ */
}
/**
* Tests getting a reconfigured inherited property.(The property is
declared on super control
* but reconfigured on sub control interface).
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetReconfiguredPropertyByGetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
-
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals(sub.getWhereAboutLayer(),"On_SubControl_Interface_Layer");
-
+ */
}
/**
* Tests setting the reconfigured and inherited property using bean setter
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSetReconfiguredPropertyBySetter() throws Exception
{
+ /*
String s=subcontrol.getWhereAboutLayer();
Assert.assertEquals(s,"On_SubControl_Interface_Layer");
-
+ */
}
/**
* Tests setting the reconfigured and inherited property using bean
setter
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSetReconfiguredPropertyBySetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals(sub.getWhereAboutLayer(),"On_SubControl_Interface_Layer");
-
+ */
}
- */
/**
* Tests getting the reconfigured and inherited property.(A property
declared on super control,
@@ -219,6 +255,7 @@
* The reset property is retrieve by context.
* The subcontrol is instantiated declaratively
*/
+ @Freq("detail")
public void testGetReconfiguredPropertyByContext() throws Exception
{
Assert.assertNotNull(subcontrol);
@@ -233,6 +270,7 @@
* The reset property is retrieve by context.
* The subcontrol is instantiated programmatically
*/
+ @Freq("detail")
public void testGetReconfiguredPropertyByContext2() throws Exception
{
SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
@@ -258,34 +296,43 @@
* Tests getting the property declared SubControl interface.
* The value is retrieved by getter on subcontrol bean
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetExtendedPropertyByGetter() throws Exception
{
+ /*
String s=subcontrol.getNewPropertyMessage();
Assert.assertEquals(s,"New Property Declared by Sub Control");
-
+ */
}
/**
* Tests getting the property declared on SubControl interface
* The value is retrieved by getter on the subcontrol bean.
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetExtendedPropertyByGetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals(sub.getNewPropertyMessage(),"New Property
Declared by Sub Control");
-
+ */
}
/**
* Tests getting the property declared on SubControl interface.
* The value is retrieved by control context.
* The subcontrol is instantiated declaratively.
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetExtendedPropertyByContext() throws Exception
{
//one new method needs to be added on SubControl
@@ -296,7 +343,9 @@
* Tests getting the property declared on SubControl interface.
* The property is retrieved by control context.
* The subcontrol is instantiated programmatically.
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testGetExtendedPropertyByContext2() throws Exception
{
//one new method needs to be added on SubControl
@@ -307,37 +356,44 @@
* Tests setting the property declared SubControl interface.
* The value is changed by setter on subcontrol bean
* The subcontrol is instantiated declaratively
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSetExtendedPropertyBySetter() throws Exception
{
+ /*
String s=subcontrol.getNewPropertyMessage();
Assert.assertEquals(s,"New Property Declared by Sub Control");
-
+ */
}
/**
* Tests setting the property declared on SubControl interface
* The value is changed by setter on the subcontrol bean.
* The subcontrol is instantiated programmatically
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testSetExtendedPropertyBySetter2() throws Exception
{
- SubControlBean
sub=(SubControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
+ /*
+ SubControlBean sub=(SubControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.extension.SubControlBean");
Assert.assertNotNull(sub);
Assert.assertEquals(sub.getNewPropertyMessage(),"New Property
Declared by Sub Control");
-
+ */
}
/**
* Invokes a method overwritten by subcontrol
- *
+ */
+ @Freq("detail")
+ @Status("inactive")
public void testOverwrittenMethod() throws Exception
{
-
+ //to be implemented depending on development status
}
-
- */
}
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/instantiate/TestInstantiate.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/instantiate/TestInstantiate.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/instantiate/TestInstantiate.java
Thu Aug 12 22:57:12 2004
@@ -5,10 +5,13 @@
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.instantiate.HelloControlBean;
import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
import org.apache.beehive.controls.test.controls.property.SingleProperty;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+import org.apache.beehive.mantis.annotations.tch.Status;
+
+
/**
* A TestCase that tests instantiating controls in different ways
@@ -36,11 +39,13 @@
/**
* Tests instantiating a custom control programmatically
*/
+ @Freq("checkin")
public void testProgrammaticInstantiation() throws Exception
{
- HelloControlBean
hc=(HelloControlBean)java.beans.Beans.instantiate(
Thread.currentThread().getContextClassLoader() ,
-
"org.apache.beehive.controls.test.controls.instantiate.HelloControlBean");
+ HelloControlBean
hc=(HelloControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader() ,
+
"org.apache.beehive.controls.test.controls.instantiate.HelloControlBean");
Assert.assertNotNull(hc);
Assert.assertEquals("Bob",hc.hello("Bob"));
@@ -49,6 +54,7 @@
/**
* Tests instantiating a custom control declaratively
*/
+ @Freq("checkin")
public void testDeclarativeInstantiation() throws Exception
{
Assert.assertNotNull(myHelloBean);
@@ -58,6 +64,8 @@
/**
* Tests declaratively instantiating a custom control with propertySet
*/
+
+ @Freq("detail")
public void testDeclareWithProperty() throws Exception
{
Assert.assertNotNull(myPropertyBean);
@@ -67,19 +75,22 @@
/**
* Tests programmically instantiating a custom control with propertySet
*/
+ @Freq("detail")
+ @Status("inactive")
public void testProgrammWithProperty() throws Exception
{
/*BUG:CR190302
PropertyMap greetAttr = new
(PropertyMap(SingleProperty.Greeting.class);
greetAttr.setProperty("GreetWord","Good afternoon!");
- SinglePropertyBean spbean = (SinglePropertyBean)
- Controls.instantiate(cl,
"org.apache.beehive.controls.test.controls.properties.SinglePropertyBean",
greetAttr);
+ SinglePropertyBean spbean =
(SinglePropertyBean)Controls.instantiate(
+ cl,
+
"org.apache.beehive.controls.test.controls.properties.SinglePropertyBean",
+ greetAttr);
Assert.assertNotNull(spbean);
Assert.assertEquals("Good afternoon!",spbean.sayHello());
*/
}
-
}
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
Thu Aug 12 22:57:12 2004
@@ -9,9 +9,14 @@
import junit.framework.TestCase;
import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+import org.apache.beehive.mantis.annotations.tch.Status;
+
/**
* Test accessing control's propertySet by control bean's getter/setter
*/
[EMAIL PROTECTED]("detail")
[EMAIL PROTECTED]("inactive")
public class ClientAccessTest extends TestCase
{
public ClientAccessTest( String s ) { super( s ); }
@@ -27,26 +32,29 @@
/**
* Accesses property value by getter of the control bean instance.
* The ccontrol bean is instantiated declaratively
- *
+ */
public void testGetterByDeclare() throws Exception
{
-
+ /*
String s=myControl.getGreetingGreetWord();
Assert.assertEquals(s,"Hello");
+ */
}
/**
* Accesses property value by getter og control bean instance.
* The control bean is instantiated programmatically
- *
+ */
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");
String s=sbean.getGreetingGreetWord();
Assert.assertEquals(s,"Hello");
+ */
}
- */
+
}
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
Thu Aug 12 22:57:12 2004
@@ -2,17 +2,22 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-
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.SinglePropertyBean;
import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+import org.apache.beehive.mantis.annotations.tch.Status;
+
+
/**
* A TestCase that tests accessing control's propertySet by both impl and
client
*/
[EMAIL PROTECTED]("detail")
[EMAIL PROTECTED]("inactive")
public class ClientImplTest extends TestCase
{
public ClientImplTest( String s ) { super( s ); }
@@ -31,30 +36,31 @@
* Resets control's property value by setter of the bean instance and
* retrieves the new value using control context on control's impl.
* This method instantiates HelloBean by declaration
- *
+ */
public void testResetPropertyByDeclare() throws Exception
{
-
+ /*
myBean.setGreetingGreetWord("Good morning!");
String s=myControl.sayHello();
Assert.assertEquals("Good morning!",s);
+ */
}
/**
* Resets control's property value by setter of the bean instance and
* retrieves the new value using control context on control's impl.
* This method instantiates HelloBean by program
- *
+ */
public void testResetPropertyByProgram() throws Exception
{
+ /*
Report report =new Report();
SinglePropertyBean
sbean=(SinglePropertyBean)Beans.instantiate(Thread.currentThread().getContextClassLoader(),
"org.apache.beehive.controls.test.controls.property.SingleProperty");
hbean.setGreetingGreetWord("Good morning!");
String s=sbean.sayHello();
Assert.assertEquals("Good morning!",s);
+ */
}
-
- */
}
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 Aug 12 22:57:12 2004
@@ -8,11 +8,14 @@
import junit.framework.Assert;
import junit.framework.TestCase;
import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+
+
/**
* A TestCase that tests accessing property values via control context in
control impl
*/
-
[EMAIL PROTECTED]("detail")
public class ImplAccessTest extends TestCase
{
public ImplAccessTest( String s ) { super( s ); }
Modified:
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/PropTest.java
==============================================================================
---
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/PropTest.java
(original)
+++
incubator/beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/property/PropTest.java
Thu Aug 12 22:57:12 2004
@@ -1,20 +1,23 @@
package org.apache.beehive.controls.test.java.property;
-import java.beans.Beans;
-import org.apache.beehive.controls.api.bean.ControlBean;
import junit.framework.Assert;
import junit.framework.TestCase;
+import java.beans.Beans;
+import org.apache.beehive.controls.api.bean.ControlBean;
import org.apache.beehive.controls.test.controls.util.TestBeanContext;
import org.apache.beehive.controls.test.controls.property.PropsBean;
import org.apache.beehive.controls.test.controls.property.PropsExtensionBean;
import org.apache.beehive.controls.test.controls.property.NestPropsBean;
-
import org.apache.beehive.controls.test.driver.property.DrivePropsBeans;
import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.mantis.annotations.tch.Freq;
+
+
[EMAIL PROTECTED]("checkin")
public class PropTest extends TestCase
{
public PropTest( String s ) { super( s ); }
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Event2Listener.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Event2Listener.java
Thu Aug 12 22:57:12 2004
@@ -0,0 +1,44 @@
+package org.apache.beehive.controls.test.controls.event;
+
+
+/**
+ * A listener class for Hello.EventSet2 event
+ */
+public class Event2Listener implements Hello.EventSet2
+{
+ private String method1Result="method1NotReceived";
+ private String method2Result="set2method2NotReceived";
+ private String overloadMethod1="overloadMethod1NotReceived";
+ private String overloadMethod2="overloadMethod2NotReceived";
+
+
+ public void method1(){
+ //Event received, flip the counter
+ method1Result="0";
+ }
+ public int set2Method2(){
+ //Event received, flip the counter
+ method2Result="0";
+ return 0;
+ }
+ public boolean set2OverloadedMethod(){
+ //Event received, flip the counter
+ overloadMethod1="0";
+ return true;
+ }
+ public boolean set2OverloadedMethod(int anArg){
+ //Event received, flip the counter
+ overloadMethod2="0";
+ return true;
+ }
+
+ public String getMethod2Result(){
+
+ return method2Result;
+ }
+
+ public String getAllResult(){
+
+ return
method1Result+method2Result+overloadMethod1+overloadMethod2;
+ }
+}
\ No newline at end of file