harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r406595 [2/6] - in /incubator/harmony/enhanced/classlib/trunk/modules/beans: ./ make/common/ src/main/java/org/apache/harmony/beans/ src/test/java-internal/ src/test/java-internal/java/ src/test/java-internal/java/beans/ src/test/java-inter...
Date Mon, 15 May 2006 09:41:12 GMT
Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/AppletInitializerTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/AppletInitializerTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/AppletInitializerTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/AppletInitializerTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/AppletInitializerTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/AppletInitializerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/AppletInitializerTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.applet.Applet;
 import java.beans.AppletInitializer;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.awt.Component;
 import java.beans.BeanDescriptor;
@@ -127,7 +127,7 @@
 		assertFalse(bd.isPreferred());
 	}
 
-	class MyCustomizer extends Component implements Customizer {
+    class MyCustomizer extends Component implements Customizer {
 
 		HashSet listeners;
 
@@ -164,6 +164,42 @@
 		public void setObject(Object bean) {
 			this.bean = bean;
 		}
-
 	}
+    
+    
+    
+    /**
+     * @tests java.beans.BeanDescriptor#BeanDescriptor(
+     *        java.lang.Class)
+     */
+    public void test_Ctor1_NullPointerExpection() {
+        try {
+            // Regression for HARMONY-225
+            new BeanDescriptor(null);
+            fail("No expected NullPointerException");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    /**
+     * @tests java.beans.BeanDescriptor#BeanDescriptor(
+     *        java.lang.Class,
+     *        java.lang.Class)
+     */
+    public void test_Ctor2_NullPointerExpection() {
+        try {
+            // Regression for HARMONY-225
+            new BeanDescriptor(null, String.class);
+            fail("No expected NullPointerException");
+        } catch (NullPointerException e) {
+        }
+    }
+    
+    /**
+     * The test checks the method testNullaryConstructor()
+     */
+    public void testNullaryConstructor() {
+        BeanDescriptor bd= new BeanDescriptor(String.class);
+        assertEquals(bd.getName(), "String");
+    }
 }

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanInfoTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanInfoTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanInfoTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanInfoTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanInfoTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeanInfoTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeanInfoTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.awt.Image;
 import java.beans.BeanDescriptor;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeansTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeansTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/BeansTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.awt.Component;
 import java.beans.AppletInitializer;
@@ -27,12 +27,19 @@
 import java.io.InputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.io.Externalizable;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 import java.net.URLClassLoader;
 
+import junit.framework.Test;
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockAppletInitializer;
+import junit.textui.TestRunner;
+import junit.framework.TestSuite;
+import org.apache.harmony.beans.tests.java.beans.mock.MockAppletInitializer;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleBean;
 
 /**
  * Unit test for java.beans.Beans
@@ -47,7 +54,7 @@
 	private File fileClass;
 
 	public BeansTest() {
-		File path = new File(fileURLCP, "tests/api/java/beans/mock");
+		File path = new File(fileURLCP, "serialization/java/beans/mock");
 		path.mkdirs();
 		fileSer = new File(path, "MockJavaBean2.ser");
 		fileClass = new File(path, "MockJavaBean2.class");
@@ -102,13 +109,13 @@
 			IllegalAccessException, InvocationTargetException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
 		Object bean = Beans.instantiate(loader,
-				"tests.api.java.beans.mock.MockJavaBean2");
+				"org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2");
 		assertEquals("as_class", (String) bean.getClass().getMethod(
 				"getPropertyOne", (Class[])null).invoke(bean, null));
 		assertSame(loader, bean.getClass().getClassLoader());
@@ -119,18 +126,18 @@
 			InvocationTargetException, NoSuchMethodException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 
 		// copy ser
 		InputStream res = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.res");
+				"/serialization/java/beans/mock/MockJavaBean2.ser");
 		copyFile(res, fileSer);
 
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
 		Object bean = Beans.instantiate(loader,
-				"tests.api.java.beans.mock.MockJavaBean2");
+				"org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2");
 		assertEquals("as_object", (String) bean.getClass().getMethod(
 				"getPropertyOne", (Class[])null).invoke(bean, null));
 		assertSame(loader, bean.getClass().getClassLoader());
@@ -162,14 +169,14 @@
 			NoSuchMethodException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
 		BeanContext context = new BeanContextSupport();
 		Object bean = Beans.instantiate(loader,
-				"tests.api.java.beans.mock.MockJavaBean2", context);
+				"org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2", context);
 		assertEquals("as_class", (String) bean.getClass().getMethod(
 				"getPropertyOne", (Class[])null).invoke(bean, null));
 		assertSame(loader, bean.getClass().getClassLoader());
@@ -181,19 +188,19 @@
 			InvocationTargetException, NoSuchMethodException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 
 		// copy ser
 		InputStream res = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.res");
+				"/serialization/java/beans/mock/MockJavaBean2.ser");
 		copyFile(res, fileSer);
 
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
 		BeanContext context = new BeanContextSupport();
 		Object bean = Beans.instantiate(loader,
-				"tests.api.java.beans.mock.MockJavaBean2", context);
+				"org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2", context);
 		assertEquals("as_object", (String) bean.getClass().getMethod(
 				"getPropertyOne", (Class[])null).invoke(bean, null));
 		assertSame(loader, bean.getClass().getClassLoader());
@@ -241,11 +248,11 @@
 			InvocationTargetException, NoSuchMethodException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
-		String beanName = "tests.api.java.beans.mock.MockJavaBean2";
+		String beanName = "org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2";
 		BeanContext context = new BeanContextSupport();
 		AppletInitializer appInit = new MockAppletInitializer();
 		Object bean = Beans.instantiate(loader, beanName, context, appInit);
@@ -262,17 +269,17 @@
 			IllegalAccessException {
 		// copy class
 		InputStream bin = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.bin");
+				"/binary/java/beans/mock/MockJavaBean2.bin");
 		copyFile(bin, fileClass);
 
 		// copy ser
 		InputStream res = getClass().getResourceAsStream(
-				"/tests/api/java/beans/mock/MockJavaBean2.res");
+				"/serialization/java/beans/mock/MockJavaBean2.ser");
 		copyFile(res, fileSer);
 
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
-		String beanName = "tests.api.java.beans.mock.MockJavaBean2";
+		String beanName = "org.apache.harmony.beans.tests.java.beans.mock.MockJavaBean2";
 		BeanContext context = new BeanContextSupport();
 		AppletInitializer appInit = new MockAppletInitializer();
 		Object bean = Beans.instantiate(loader, beanName, context, appInit);
@@ -285,7 +292,7 @@
 
 	public void testInstantiateClassLoaderStringBeanContextAppletInitializer_LoaderNull()
 			throws IOException, ClassNotFoundException {
-		String beanName = "tests.api.java.beans.MockJavaBean";
+		String beanName = "org.apache.harmony.beans.tests.java.beans.MockJavaBean";
 		BeanContext context = new BeanContextSupport();
 		AppletInitializer appInit = new MockAppletInitializer();
 		Object bean = Beans.instantiate(null, beanName, context, appInit);
@@ -312,7 +319,7 @@
 			throws IOException, ClassNotFoundException {
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
-		String beanName = "tests.api.java.beans.MockJavaBean";
+		String beanName = "org.apache.harmony.beans.tests.java.beans.MockJavaBean";
 		AppletInitializer appInit = new MockAppletInitializer();
 		Object bean = Beans.instantiate(loader, beanName, null, appInit);
 		assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
@@ -324,7 +331,7 @@
 			throws IOException, ClassNotFoundException {
 		URLClassLoader loader = new URLClassLoader(new URL[] { fileURLCP
 				.toURL() });
-		String beanName = "tests.api.java.beans.MockJavaBean";
+		String beanName = "org.apache.harmony.beans.tests.java.beans.MockJavaBean";
 		BeanContext context = new BeanContextSupport();
 		Object bean = Beans.instantiate(loader, beanName, context, null);
 		assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
@@ -438,4 +445,104 @@
 		fos.close();
 		src.close();
 	}
+    
+    
+    /**
+     * The test checks the method instantiate()
+     * using specific classloader for class loading
+     */
+    public void testLoadBySpecificClassLoader() {
+        String beanName = "org.apache.harmony.beans.tests.java.beans.auxiliary.SampleBean";
+        
+        try {
+            ClassLoader cls = createSpecificClassLoader();
+            Object bean = Beans.instantiate(cls, beanName);
+            
+            assertNotNull(bean);
+            assertEquals(bean.getClass(), SampleBean.class);
+            
+            SampleBean sampleBean = (SampleBean) bean;
+            checkValues(sampleBean);
+        } catch (ClassNotFoundException cnfe) {
+            fail("Class with name " + beanName + " is not found");
+        } catch (IOException ioe) {
+            fail("IOException is thrown while loading " + beanName + " class");
+        }
+    }
+    
+    /**
+     * The test checks the method instantiate()
+     * using default classloader for class loading
+     */
+    public void testLoadByDefaultClassLoader() {
+        String beanName = "org.apache.harmony.beans.tests.java.beans.auxiliary.SampleBean";
+        
+        try {
+            Object bean = Beans.instantiate(null, beanName);
+            
+            assertNotNull(bean);
+            assertEquals(bean.getClass(), SampleBean.class);
+            
+            SampleBean sampleBean = (SampleBean) bean;
+            checkValues(sampleBean);
+        } catch (ClassNotFoundException cnfe) {
+            fail("Class with name " + beanName + " is not found");
+        } catch (IOException ioe) {
+            fail("IOException is thrown while loading " + beanName + " class");
+        }
+    }
+
+    //regression test for HARMONY-358
+    public void testInstantiate() throws Exception {
+        try {
+            Class.forName(this.getClass().getName(), true, null);
+            fail("This test is designed to run from classpath rather then from bootclasspath");
+        } catch (ClassNotFoundException ok) {
+        }
+        assertNotNull(Beans.instantiate(null, this.getClass().getName()));
+    } 
+
+    //regression test for HARMONY-402
+    public void test_isInstanceOf_Object_Class() {
+        ObjectBean bean = new ObjectBean();
+        // correct non-null targetType
+        Class targetType = Externalizable.class;
+        assertTrue(Beans.isInstanceOf(bean, targetType));
+
+        // null targetType
+        targetType = null;
+        assertFalse(Beans.isInstanceOf(bean, targetType));
+    } 
+    
+    /**
+     * 
+     */
+    public static Test suite() {
+        return new TestSuite(BeansTest.class);
+    }
+    
+    /**
+     * 
+     */
+    public static void main(String[] args) {
+        TestRunner.run(suite());
+    }
+    
+    private ClassLoader createSpecificClassLoader() {
+        return new ClassLoader() {
+            public Class loadClass(String name) throws ClassNotFoundException {
+                Class result = super.loadClass(name);
+                return result;
+            }
+        };        
+    }
+    
+    private void checkValues(SampleBean sampleBean) {
+        assertEquals(null, sampleBean.getText());
+    }
+
+    private class ObjectBean implements Externalizable { 
+        public void writeExternal(ObjectOutput out) {}; 
+        public void readExternal(ObjectInput in){}; 
+    } 
 }

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizedPersistenceDelegateTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizedPersistenceDelegateTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizedPersistenceDelegateTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizedPersistenceDelegateTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizedPersistenceDelegateTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizedPersistenceDelegateTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizedPersistenceDelegateTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.DefaultPersistenceDelegate;
 import java.beans.Encoder;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizerTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizerTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizerTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizerTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizerTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/CustomizerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/CustomizerTest.java Mon May 15 02:40:33 2006
@@ -13,12 +13,12 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.Customizer;
 import java.beans.PropertyChangeListener;
 
-import tests.api.java.beans.BeanInfoTest.DummyBeanInfo;
+import org.apache.harmony.beans.tests.java.beans.BeanInfoTest.DummyBeanInfo;
 
 import junit.framework.TestCase;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DefaultPersistenceDelegateTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DefaultPersistenceDelegateTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DefaultPersistenceDelegateTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.DefaultPersistenceDelegate;
 import java.beans.Encoder;
@@ -26,9 +26,9 @@
 import java.beans.Statement;
 
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockFoo;
-import tests.api.java.beans.mock.MockFoo2;
-import tests.api.java.beans.mock.MockFooStop;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFoo;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFoo2;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooStop;
 import tests.util.CallVerificationStack;
 
 /**

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DesignModeTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DesignModeTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DesignModeTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DesignModeTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DesignModeTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/DesignModeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DesignModeTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.DesignMode;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EncoderTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EncoderTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EncoderTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EncoderTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EncoderTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EncoderTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EncoderTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.DefaultPersistenceDelegate;
 import java.beans.Encoder;
@@ -27,10 +27,10 @@
 import java.util.List;
 
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockBean4Codec;
-import tests.api.java.beans.mock.MockBean4CodecBadGetter;
-import tests.api.java.beans.mock.MockExceptionListener;
-import tests.api.java.beans.mock.MockFooLiYang;
+import org.apache.harmony.beans.tests.java.beans.mock.MockBean4Codec;
+import org.apache.harmony.beans.tests.java.beans.mock.MockBean4CodecBadGetter;
+import org.apache.harmony.beans.tests.java.beans.mock.MockExceptionListener;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooLiYang;
 
 public class EncoderTest extends TestCase {
 
@@ -317,7 +317,7 @@
 								+ LS
 								+ "remove()< null"
 								+ LS
-								+ "writeExpression()> myid=new name=(class tests.api.java.beans.EncoderTest$SampleBean).new()"
+								+ "writeExpression()> myid=new name=(class org.apache.harmony.beans.tests.java.beans.EncoderTest$SampleBean).new()"
 								+ LS, lastIndex);
 		assertTrue(lastIndex <= index);
 		lastIndex = index;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java Mon May 15 02:40:33 2006
@@ -13,8 +13,10 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.beans.EventHandler;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -25,14 +27,267 @@
 import java.util.EventListener;
 import java.util.EventObject;
 
+import junit.framework.Test;
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockButton;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.apache.harmony.beans.tests.java.beans.mock.MockButton;
+
+import org.apache.harmony.beans.tests.java.beans.auxiliary.InvocationObject;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleEvent;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleListener;
+
 
 /**
  * Unit test for EventHandler.
  */
 public class EventHandlerTest extends TestCase {
 
+    private Object object;
+    private String methodName;
+    private Object[] params;
+    
+    private String text = "something";
+    
+    /**
+     * 
+     */
+    public EventHandlerTest() {
+        super();
+    }
+    
+    /**
+     *
+     */
+    public EventHandlerTest(String name) {
+        super(name);
+    }
+    
+    /**
+     * The test checks event handler accessors
+     */
+    public void testAccessors() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        EventHandler handler = new EventHandler(
+            invocationObject, "someText", "source.text", "actionPerformed" );
+        assertEquals(invocationObject, handler.getTarget());
+        assertEquals("someText", handler.getAction());
+        assertEquals("source.text", handler.getEventPropertyName());
+        assertEquals("actionPerformed", handler.getListenerMethodName());
+    }
+    
+    /**
+     * The test checks the method invoke() with null listener value
+     */
+    public void testNullListenerMethodName() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        
+        EventHandler handler = new EventHandler(
+            invocationObject, "someText", "source.text", null );
+        
+        Object proxy = EventHandler.create(ActionListener.class,
+            invocationObject, "someText", "source.text");
+
+        Method m = null;
+        try {
+            m = ActionListener.class.getMethod("actionPerformed",
+                    new Class[] { ActionEvent.class } );
+            Object result = handler.invoke(proxy, m,
+                    new Object[] { new ActionEvent(this, 0, "") } );
+            
+            assertEquals(invocationObject.getSomeText(), getText());
+        } catch (Exception e) {
+            fail("Method actionPerformed not found in interface");
+        }
+    }
+    
+    /**
+     * The test checks the method invoke()
+     */
+    public void testInvoke() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        
+        EventHandler handler = new EventHandler(
+            invocationObject, "someText", "source.text", "actionPerformed" );
+        
+        Object proxy = EventHandler.create(ActionListener.class,
+            invocationObject, "someText", "source.text");
+
+        Method m = null;
+        try {
+            m = ActionListener.class.getMethod("actionPerformed",
+                    new Class[] { ActionEvent.class } );
+            Object result = handler.invoke(proxy, m,
+                    new Object[] { new ActionEvent(this, 0, "") } );
+            
+            assertEquals(invocationObject, handler.getTarget());
+            assertEquals(invocationObject.getSomeText(), getText());
+        } catch (Exception e) {
+            fail("Method actionPerformed not found in interface");
+        }
+    }
+    
+    /**
+     * The test checks the method invoke() with null property name
+     */
+    public void testInvokeWithNullPropertyName() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        
+        EventHandler handler = new EventHandler(
+            invocationObject, "doSomething", null, null );
+        
+        Object proxy = EventHandler.create(SampleListener.class,
+                invocationObject, "doSomething");
+
+        try {
+            Method m = SampleListener.class.getMethod(
+                "fireSampleEvent", new Class[] { SampleEvent.class } );
+            Object result = handler.invoke(proxy, m, null);
+            
+            assertEquals(invocationObject, handler.getTarget());
+            assertEquals("doSomething", getMethodName());
+        } catch (Exception e) {
+            fail("Method doSomething not found in interface");
+        }
+    }
+    
+    /**
+     * The test checks the object created with the create() method call
+     */
+    public void testCreateWithMethodCall() {
+        Object invocationObject = new InvocationObject(this);
+        ActionListener listener = (ActionListener) EventHandler.create(
+            ActionListener.class, invocationObject, "doSomething");
+        listener.actionPerformed(new ActionEvent(this, 0, ""));
+        
+        assertEquals(getObject(), invocationObject);
+        assertEquals("doSomething", getMethodName());
+        
+        Object[] params = getParams();
+        if(params.length != 0) {
+            fail("Number of params should be 0");
+        }
+    }
+    
+    /**
+     * The test checks the setter is initialized properly
+     */
+    public void testCreateWithSetterCall() {
+        Object invocationObject = new InvocationObject(this);
+        ActionEvent ae = new ActionEvent(this, 0, "");
+        ActionListener listener = (ActionListener) EventHandler.create(
+            ActionListener.class, invocationObject, "someObject", "source");
+        listener.actionPerformed(ae);
+        
+        assertEquals(getObject(), invocationObject);
+        assertEquals("setSomeObject", getMethodName());
+        
+        Object[] params = getParams();
+        if(params.length != 1) {
+            fail("Number of params should be 1");
+        } else {
+            assertEquals(ae.getSource(), params[0]);
+        }
+    }
+    
+    /**
+     * The test checks the object created with the create() method call for
+     * dot-separated property
+     */
+    public void testCreateWithDottedParameterCall() {
+        Object invocationObject = new InvocationObject(this);
+        ActionEvent ae = new ActionEvent(this, 0, "");
+        ActionListener listener = (ActionListener) EventHandler.create(
+            ActionListener.class, invocationObject, "someText", "source.text");
+        listener.actionPerformed(ae);
+        
+        assertEquals(getObject(), invocationObject);
+        assertEquals("setSomeText", getMethodName());
+        
+        Object[] params = getParams();
+        if(params.length != 1) {
+            fail("Number of params should be 1");
+        } else {
+            assertEquals(((EventHandlerTest) ae.getSource()).getText(),
+                    params[0]);
+        }
+    }
+    
+    /**
+     * The test checks the event is fired for object created with the create()
+     */
+    public void testCreateWithMethodCallWhichIsSetter() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        SampleEvent event = new SampleEvent("bean");
+        
+        SampleListener listener = (SampleListener) EventHandler.create(
+                SampleListener.class,
+            invocationObject, "doSomething", "i", null);
+        
+        listener.fireSampleEvent(event);
+        
+        assertEquals("doSomething", getMethodName());
+        assertTrue(event.getI() == invocationObject.getIntValue());
+    }
+    
+    /**
+     * fireSampleEvent scenario
+     */
+    public void testCreateForStaticMethodAsPropertyGetter() {
+        InvocationObject invocationObject = new InvocationObject(this);
+        SampleEvent event = new SampleEvent("bean");
+        
+        SampleListener listener = (SampleListener) EventHandler.create(
+                SampleListener.class,
+            invocationObject, "someValue", "j");
+        
+        listener.fireSampleEvent(event);
+        
+        assertEquals("setSomeValue", getMethodName());
+    }
+    
+    /**
+     * 
+     */
+    public static Test suite() {
+        //TestSuite suite = new TestSuite();
+        //suite.addTest(new EventHandlerTest("testCreateForStaticMethodAsPropertyGetter"));
+        //return suite;
+        return new TestSuite(EventHandlerTest.class);
+    }
+    
+    /**
+     * 
+     */
+    public static void main(String[] args) {
+        TestRunner.run(suite());
+    }
+    
+    public void logMethodCall(
+            Object object, String methodName, Object[] params) {
+        this.object = object;
+        this.methodName = methodName;
+        this.params = params;
+    }
+    
+    public String getText() {
+        return text;
+    }
+    
+    private Object getObject() {
+        return object;
+    }
+    
+    private String getMethodName() {
+        return methodName;
+    }
+    
+    private Object[] getParams() {
+        return params;
+    }
+    
+    
+    
 	/*
 	 * @see TestCase#setUp()
 	 */

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventSetDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventSetDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventSetDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.EventSetDescriptor;
 import java.beans.IntrospectionException;
@@ -23,7 +23,10 @@
 import java.lang.reflect.Method;
 
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockFakeListener;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFakeListener;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.OtherBean;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleListener;
+
 
 /**
  * Unit test for EventSetDescriptor
@@ -166,7 +169,7 @@
 		String eventSetName = "mockPropertyChange";
 		String listenerMethodName = eventSetName;
 		Class sourceClass = MockSourceClass.class;
-		Class listenerType = tests.api.java.beans.mock.MockPropertyChangeListener2.class;
+		Class listenerType = org.apache.harmony.beans.tests.java.beans.mock.MockPropertyChangeListener2.class;
 		EventSetDescriptor esd = new EventSetDescriptor(sourceClass,
 				eventSetName, listenerType, listenerMethodName);
 
@@ -1235,6 +1238,21 @@
 		assertFalse(esd.isInDefaultEventSet());
 	}
 
+
+    /**
+     * The test checks the constructor
+     */
+    public void testEventSetDescriptorConstructor() {
+        try {
+            new EventSetDescriptor(OtherBean.class, "sample",
+                    SampleListener.class, "fireSampleEvent");
+        } catch (Exception e) {
+            fail("Exception of " + e.getClass() + 
+                " class with message " + e.getMessage() + " is thrown");
+        }
+        
+    }
+    
 	protected String getUnQualifiedClassName(Class classType) {
 		String qName = classType.getName();
 		return qName.substring(qName.lastIndexOf('.') + 1);
@@ -1264,11 +1282,11 @@
 		}
 
 		public void addMockPropertyChangeListener2(
-				tests.api.java.beans.mock.MockPropertyChangeListener2 listener) {
+				org.apache.harmony.beans.tests.java.beans.mock.MockPropertyChangeListener2 listener) {
 		}
 
 		public void removeMockPropertyChangeListener2(
-				tests.api.java.beans.mock.MockPropertyChangeListener2 listener) {
+				org.apache.harmony.beans.tests.java.beans.mock.MockPropertyChangeListener2 listener) {
 		}
 
 		public void addMockFakeListener(MockFakeListener listener) {

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExceptionListenerTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExceptionListenerTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExceptionListenerTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExceptionListenerTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExceptionListenerTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExceptionListenerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExceptionListenerTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.ExceptionListener;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExpressionTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExpressionTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ExpressionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.DefaultPersistenceDelegate;
 import java.beans.Expression;
@@ -22,13 +22,134 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import junit.framework.Test;
 import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleBean;
 
 /**
  * Test the class java.beans.Expression.
  */
 public class ExpressionTest extends TestCase {
 
+    private static int testId = -1;
+
+    /**
+     * 
+     */
+    public ExpressionTest() {
+        super();
+    }
+    
+    /**
+     *
+     */
+    public ExpressionTest(String name) {
+        super(name);
+    }
+    
+    /**
+     * The test checks the correct constructor is initialized
+     */
+    public void testConstructor() {
+        Expression expr = new Expression(SampleBean.class, "new",
+                new Object[] { "hello" });
+        try {
+            Object result = expr.getValue();
+            if(result != null && result instanceof SampleBean) {
+                SampleBean bean = (SampleBean) result;
+                assertEquals("hello", bean.getText());
+            } else {
+                fail("Cannot instantiate an instance of Bean class.");
+            }
+        } catch (Exception e) {
+            System.out.println(e.getClass() + ": " + e.getMessage());
+            fail("Exception is thrown while trying to invoke new Bean(String)");
+        }
+    }
+    
+    /**
+     * The test checks the correct static method is initialized
+     */
+    public void testStatic() {
+        SampleBean theBean = new SampleBean();
+        Expression expr = new Expression(SampleBean.class, "create",
+                new Object[] { "hello", theBean });
+        try {
+            Object result = expr.getValue();
+            if(result != null && result instanceof SampleBean) {
+                SampleBean bean = (SampleBean) result;
+                assertEquals("hello", bean.getText());
+                assertEquals(theBean, bean.getObject());
+            } else {
+                fail("Cannot instantiate an instance of Bean class by "
+                        + "static method.");
+            }
+        } catch (Exception e) {
+            System.out.println(e.getClass() + ": " + e.getMessage());
+            fail("Exception is thrown while trying to invoke "
+                    + "SampleBean.create(String, SampleBean)");
+        }
+    }
+    
+    /**
+     * The test checks the correct getter is initialized
+     */
+    public void testGetter() {
+        Expression expr = new Expression(new SampleBean("hello"), "getText",
+                new Object[] {});
+        try {
+            Object result = expr.getValue();
+            if(result != null && result instanceof String) {
+                assertEquals("hello", result);
+            } else {
+                fail("Result of SampleBean.getText() call is not "
+                        + "of String type.");
+            }
+        } catch (Exception e) {
+            System.out.println(e.getClass() + ": " + e.getMessage());
+            fail("Exception is thrown while trying to invoke "
+                    + "SampleBean.getText()");
+        }
+    }
+    
+    /**
+     * The test checks the correct array getter is initialized
+     */
+    public void testArrayGetter() {
+        int[] a = {1, 2, 3};
+        Expression expr = new Expression(a, "get",
+                new Object[] { new Integer(1) });
+        try {
+            Object result = expr.getValue();
+            if(result != null && result instanceof Integer) {
+                assertEquals(new Integer(2), result);
+            } else {
+                fail("Result of array getter is not of Integer type.");
+            }
+        } catch (Exception e) {
+            System.out.println(e.getClass() + ": " + e.getMessage());
+            fail("Exception is thrown while trying to invoke get element "
+                    + "from array");
+        }
+    }
+    
+    /**
+     * 
+     */
+    public static Test suite() {
+        return new TestSuite(ExpressionTest.class);
+    }
+    
+    /**
+     * 
+     */
+    public static void main(String[] args) {
+        TestRunner.run(suite());
+    }
+    
 	/*
 	 * Test the constructor under normal conditions.
 	 */

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FeatureDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FeatureDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FeatureDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FeatureDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FeatureDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FeatureDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FeatureDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.FeatureDescriptor;
 import java.util.Enumeration;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FozzzEditor.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FozzzEditor.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FozzzEditor.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FozzzEditor.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FozzzEditor.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/FozzzEditor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/FozzzEditor.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.awt.Component;
 import java.awt.Graphics;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IndexedPropertyDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IndexedPropertyDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IndexedPropertyDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.IndexedPropertyDescriptor;
 import java.beans.IntrospectionException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectionExceptionTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectionExceptionTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectionExceptionTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectionExceptionTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectionExceptionTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectionExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectionExceptionTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.IntrospectionException;
 import java.io.IOException;
@@ -56,7 +56,13 @@
 
         IntrospectionException de = (IntrospectionException) SerializationTester
                 .readObject(e,
-                        "tests/api/java/beans/IntrospectionException.ser");
+                        "serialization/java/beans/IntrospectionException.ser");
         assertEquals(message, de.getMessage());
+    }
+    
+    public void testIntrospectionExceptionMessage() {
+        // Regression for HARMONY-235
+        IntrospectionException e = new IntrospectionException("test message");
+        assertEquals("test message", e.getMessage());
     }
 }

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/IntrospectorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.BeanDescriptor;
 import java.beans.BeanInfo;
@@ -34,18 +34,25 @@
 import java.util.TooManyListenersException;
 
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.FakeFox;
-import tests.api.java.beans.mock.FakeFox01;
-import tests.api.java.beans.mock.FakeFox011;
-import tests.api.java.beans.mock.FakeFox01BeanInfo;
-import tests.api.java.beans.mock.FakeFox02;
-import tests.api.java.beans.mock.MockButton;
-import tests.api.java.beans.mock.MockFoo;
-import tests.api.java.beans.mock.MockFooButton;
-import tests.api.java.beans.mock.MockFooLabel;
-import tests.api.java.beans.mock.MockFooStop;
-import tests.api.java.beans.mock.MockFooSub;
-import tests.api.java.beans.mock.MockFooSubSub;
+import org.apache.harmony.beans.tests.java.beans.mock.FakeFox;
+import org.apache.harmony.beans.tests.java.beans.mock.FakeFox01;
+import org.apache.harmony.beans.tests.java.beans.mock.FakeFox011;
+import org.apache.harmony.beans.tests.java.beans.mock.FakeFox01BeanInfo;
+import org.apache.harmony.beans.tests.java.beans.mock.FakeFox02;
+import org.apache.harmony.beans.tests.java.beans.mock.MockButton;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFoo;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooButton;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooLabel;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooStop;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooSub;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooSubSub;
+
+import org.apache.harmony.beans.tests.java.beans.auxiliary.SampleBean;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.ChildBean;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.OtherBean;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.MisprintBean;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.StandardBean2;
+import org.apache.harmony.beans.tests.java.beans.auxiliary.GrannyBean;
 
 /**
  * Unit test for Introspector.
@@ -64,6 +71,202 @@
 		Introspector.setBeanInfoSearchPath(defaultPackage);
 	}
 
+    
+    /**
+     * The test checks the constructor is private
+     */
+    public void testIntrospectorConstructor() {
+        try {
+            Class.forName("java.beans.Introspector").newInstance();
+            fail("No exception is thrown on new Introspector() call");
+        } catch (Exception e) {}
+    }
+
+    /**
+     * The test checks the getBeanDescriptor method
+     */
+    public void testBeanDescriptor() throws Exception {
+        String[] oldBeanInfoSearchPath = Introspector.getBeanInfoSearchPath();
+        try {
+            Introspector
+                    .setBeanInfoSearchPath(new String[] { "java.beans.infos" });
+            BeanInfo info = Introspector.getBeanInfo(SampleBean.class);
+            assertNotNull(info);
+            BeanDescriptor descriptor = info.getBeanDescriptor();
+            assertNotNull(descriptor);
+            assertEquals(SampleBean.class, descriptor.getBeanClass());
+        } finally {
+            Introspector.setBeanInfoSearchPath(oldBeanInfoSearchPath);
+        }
+    }
+
+    /**
+     * The test checks the getMethodDescriptor method
+     * @throws IntrospectionException
+     */
+    public void testNonUniqueByNameMethodDescriptors() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(ChildBean.class);
+        assertNotNull(info);
+        MethodDescriptor[] mds = info.getMethodDescriptors();
+        assertNotNull(mds);
+        assertEquals(11, mds.length);
+        assertEquals("wait", mds[8].getName());
+        assertEquals("wait", mds[9].getName());
+        assertEquals("wait", mds[10].getName());
+    }
+
+    /**
+     * The test checks the getEventSetDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testUnicastEventSetDescriptor() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(SampleBean.class);
+        assertNotNull(info);
+        EventSetDescriptor[] descriptors = info.getEventSetDescriptors();
+        assertNotNull(descriptors);
+        for (int i = 0; i < descriptors.length; ++i) {
+            Method m = descriptors[i].getAddListenerMethod();
+            if (m != null) {
+                Class[] exceptionTypes = m.getExceptionTypes();
+                boolean found = false;
+
+                for (int j = 0; j < exceptionTypes.length; ++j) {
+                    if (exceptionTypes[j]
+                            .equals(TooManyListenersException.class)) {
+                        assertTrue(descriptors[i].isUnicast());
+                        found = true;
+                        break;
+                    }
+                }
+
+                if (!found) {
+                    assertFalse(descriptors[i].isUnicast());
+                }
+
+            }
+        }
+    }
+
+    /**
+     * The test checks the getEventSetDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testEventSetDescriptorWithoutAddListenerMethod() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(OtherBean.class);
+        assertNotNull(info);
+        EventSetDescriptor[] descriptors = info.getEventSetDescriptors();
+        assertNotNull(descriptors);
+        assertEquals(0, descriptors.length);
+    }
+
+    /**
+     * The test checks the getEventSetDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testIllegalEventSetDescriptor() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(MisprintBean.class);
+        assertNotNull(info);
+        EventSetDescriptor[] descriptors = info.getEventSetDescriptors();
+        assertNotNull(descriptors);
+        assertEquals(0, descriptors.length);
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testPropertyDescriptorWithSetMethod() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(OtherBean.class);
+        assertNotNull(info);
+        PropertyDescriptor[] descriptors = info.getPropertyDescriptors();
+        assertNotNull(descriptors);
+        assertEquals(2, descriptors.length);
+        assertEquals("class", descriptors[0].getName());
+        assertEquals("number", descriptors[1].getName());
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testUseAllBeanInfo() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(ChildBean.class,
+                Introspector.USE_ALL_BEANINFO);
+        PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        assertEquals(1, pds.length);
+        assertEquals("childText", pds[0].getName());
+    }
+
+    //Regression test for HARMONY-257
+    public void testGetBeanInfo_NPE() throws IntrospectionException {
+        try {
+            Introspector.getBeanInfo((java.lang.Class) null);
+            fail("getBeanInfo should throw NullPointerException");
+        } catch (NullPointerException e) {}
+
+        try {
+            Introspector.getBeanInfo((java.lang.Class) null,
+                    (java.lang.Class) null);
+            fail("getBeanInfo should throw NullPointerException");
+        } catch (NullPointerException e) {}
+
+        try {
+            Introspector.getBeanInfo((java.lang.Class) null, 0);
+            fail("getBeanInfo should throw NullPointerException");
+        } catch (NullPointerException e) {}
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors method for
+     * IGNORE_IMMEDIATE_BEANINFO flag
+     * @throws IntrospectionException
+     */
+    public void testIgnoreImmediateBeanInfo() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(ChildBean.class,
+                Introspector.IGNORE_IMMEDIATE_BEANINFO);
+        PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        assertEquals(1, pds.length);
+        assertEquals("parentText", pds[0].getName());
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors method for IGNORE_ALL_BEANINFO
+     * flag
+     * @throws IntrospectionException
+     */
+    public void testIgnoreAllBeanInfo() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(ChildBean.class,
+                Introspector.IGNORE_ALL_BEANINFO);
+        PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        assertEquals(2, pds.length);
+        assertEquals("class", pds[0].getName());
+        assertEquals("text", pds[1].getName());
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors method
+     * @throws IntrospectionException
+     */
+    public void testAdditionalBeanInfo() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(StandardBean2.class);
+        PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        assertEquals(1, pds.length);
+        assertEquals("grannyText", pds[0].getName());
+    }
+
+    /**
+     * The test checks the getPropertyDescriptors for stop class prune
+     * @throws IntrospectionException
+     */
+    public void testStopClass() throws IntrospectionException {
+        BeanInfo info = Introspector.getBeanInfo(ChildBean.class,
+                GrannyBean.class);
+        PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        assertEquals(1, pds.length);
+        assertEquals("childText", pds[0].getName());
+    }
+    
+    
 	/*
 	 * Common
 	 */
@@ -453,7 +656,7 @@
 
 	public void testSetBeanInfoSearchPath() throws IntrospectionException {
 		String[] oldPath = Introspector.getBeanInfoSearchPath();
-		String[] newPath = new String[] { "tests.api.java.beans", };
+		String[] newPath = new String[] { "org.apache.harmony.beans.tests.java.beans", };
 		Introspector.setBeanInfoSearchPath(newPath);
 
 		BeanInfo info = Introspector.getBeanInfo(MockFooLabel.class);

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MethodDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MethodDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MethodDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MethodDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MethodDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MethodDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MethodDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.MethodDescriptor;
 import java.beans.ParameterDescriptor;
@@ -135,5 +135,32 @@
         assertFalse(md.isExpert());
         assertFalse(md.isHidden());
         assertFalse(md.isPreferred());
+    }
+    
+    /**
+     * @tests java.beans.MethodDescriptor#MethodDescriptor(
+     *        java.lang.reflect.Method)
+     */
+    public void test_Ctor1_NullPointerExpection() {
+        try {
+            // Regression for HARMONY-226
+            new MethodDescriptor(null);
+            fail("No expected NullPointerException");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    /**
+     * @tests java.beans.MethodDescriptor#MethodDescriptor(
+     *        java.lang.reflect.Method,
+     *        java.beans.ParameterDescriptor[])
+     */
+    public void test_Ctor2_NullPointerExpection() {
+        try {
+            // Regression for HARMONY-226
+            new MethodDescriptor(null, new ParameterDescriptor[0]);
+            fail("No expected NullPointerException");
+        } catch (NullPointerException e) {
+        }
     }
 }

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Owner.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Owner.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Owner.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Owner.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Owner.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Owner.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Owner.java Mon May 15 02:40:33 2006
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 public class MockBean4Owner_Owner {
 	private int v = 1;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Target.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Target.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Target.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Target.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Target.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4Owner_Target.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4Owner_Target.java Mon May 15 02:40:33 2006
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 public class MockBean4Owner_Target {
 	MockBean4Owner_Owner v;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField.java Mon May 15 02:40:33 2006
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 public class MockBean4StaticField {
 	public static MockBean4StaticField inst = new MockBean4StaticField(999);

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField_PD.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField_PD.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField_PD.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField_PD.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField_PD.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockBean4StaticField_PD.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockBean4StaticField_PD.java Mon May 15 02:40:33 2006
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.Encoder;
 import java.beans.Expression;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFakeEvent.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFakeEvent.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFakeEvent.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFakeEvent.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFakeEvent.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFakeEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFakeEvent.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 /**
  * This is a fake event which is not a subclass of java.util.EventObject

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFooLabelBeanInfo.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFooLabelBeanInfo.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFooLabelBeanInfo.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFooLabelBeanInfo.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFooLabelBeanInfo.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockFooLabelBeanInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockFooLabelBeanInfo.java Mon May 15 02:40:33 2006
@@ -13,14 +13,14 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.BeanDescriptor;
 import java.beans.IntrospectionException;
 import java.beans.PropertyDescriptor;
 import java.beans.SimpleBeanInfo;
 
-import tests.api.java.beans.mock.MockFooLabel;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooLabel;
 
 public class MockFooLabelBeanInfo extends SimpleBeanInfo {
 	Class clazz = MockFooLabel.class;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockJavaBean.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockJavaBean.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockJavaBean.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockJavaBean.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockJavaBean.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockJavaBean.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockJavaBean.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.io.Serializable;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeEvent.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeEvent.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeEvent.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeEvent.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeEvent.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeEvent.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.util.EventObject;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeListener.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeListener.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeListener.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeListener.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeListener.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/MockPropertyChangeListener.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/MockPropertyChangeListener.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 /**
  * TODO Type description

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ParameterDescriptorTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ParameterDescriptorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ParameterDescriptorTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ParameterDescriptorTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ParameterDescriptorTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/ParameterDescriptorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ParameterDescriptorTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.ParameterDescriptor;
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PersistenceDelegateTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PersistenceDelegateTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PersistenceDelegateTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.Encoder;
 import java.beans.ExceptionListener;
@@ -22,8 +22,8 @@
 import java.beans.Statement;
 
 import junit.framework.TestCase;
-import tests.api.java.beans.mock.MockFoo;
-import tests.api.java.beans.mock.MockFooStop;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFoo;
+import org.apache.harmony.beans.tests.java.beans.mock.MockFooStop;
 import tests.util.CallVerificationStack;
 
 /**
@@ -59,7 +59,7 @@
 		assertSame(null, CallVerificationStack.getInstance().pop());
 		assertSame(oldInstance, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("initialize", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -68,7 +68,7 @@
 		// should have called mutatesTo()
 		assertSame(null, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("mutatesTo", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -76,7 +76,7 @@
 
 		// should have called Encoder.get()
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockEncoder",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockEncoder",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("get", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -99,7 +99,7 @@
 
 		// should have called writeExpression()
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockEncoder",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockEncoder",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("writeExpression", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -108,7 +108,7 @@
 		// should have called instantiate()
 		assertSame(enc, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("instantiate", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -116,7 +116,7 @@
 
 		// should have called Encoder.remove()
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockEncoder",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockEncoder",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("remove", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -125,7 +125,7 @@
 		// should have called mutatesTo()
 		assertSame(null, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("mutatesTo", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -133,7 +133,7 @@
 
 		// should have called Encoder.get()
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockEncoder",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockEncoder",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("get", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -189,7 +189,7 @@
 		assertSame(o2, CallVerificationStack.getInstance().pop());
 		assertSame(o1, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("initialize", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());
@@ -234,7 +234,7 @@
 		assertSame(null, CallVerificationStack.getInstance().pop());
 		assertSame(null, CallVerificationStack.getInstance().pop());
 		assertEquals(
-				"tests.api.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
+				"org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest$MockPersistenceDelegate",
 				CallVerificationStack.getInstance().getCurrentSourceClass());
 		assertEquals("initialize", CallVerificationStack.getInstance()
 				.getCurrentSourceMethod());

Copied: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java (from r405685, incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PropertyChangeEventTest.java)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java?p2=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java&p1=incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PropertyChangeEventTest.java&r1=405685&r2=406595&rev=406595&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/PropertyChangeEventTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java Mon May 15 02:40:33 2006
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.beans;
+package org.apache.harmony.beans.tests.java.beans;
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeSupport;
@@ -170,7 +170,7 @@
 				oldValue, newValue);
 		PropertyChangeEvent deEvent = (PropertyChangeEvent) SerializationTester
 				.readObject(event,
-						"tests/api/java/beans/PropertyChangeEvent.ser");
+						"serialization/java/beans/PropertyChangeEvent.ser");
 		assertEquals(event.getNewValue(), deEvent.getNewValue());
 		assertEquals(event.getOldValue(), deEvent.getOldValue());
 		assertEquals(event.getPropagationId(), deEvent.getPropagationId());



Mime
View raw message