harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r394923 [16/16] - in /incubator/harmony/enhanced/classlib/trunk/modules/beans: make/common/ src/test/java.injected/ src/test/java.injected/java/ src/test/java.injected/java/beans/ src/test/java/tests/ src/test/java/tests/api/ src/test/java/...
Date Tue, 18 Apr 2006 12:11:45 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubBeanInfo.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubBeanInfo.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubBeanInfo.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubBeanInfo.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,82 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+import java.beans.EventSetDescriptor;
+import java.beans.IntrospectionException;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyDescriptor;
+import java.beans.SimpleBeanInfo;
+import java.lang.reflect.Method;
+
+import tests.api.java.beans.MockPropertyChangeListener;
+
+/**
+ * test Introspector
+ */
+public class MockFooSubBeanInfo extends SimpleBeanInfo {
+
+	Class clazz = MockFooSub.class;
+
+	String suffix = ".MockFooSubBeanInfo";
+
+	public PropertyDescriptor[] getPropertyDescriptors() {
+		PropertyDescriptor[] pds = new PropertyDescriptor[1];
+		try {
+			PropertyDescriptor pd = new PropertyDescriptor("text", clazz);
+			pd.setName(pd.getName() + suffix);
+			pds[0] = pd;
+		} catch (IntrospectionException e) {
+			e.printStackTrace();
+		}
+		return pds;
+	}
+
+	public MethodDescriptor[] getMethodDescriptors() {
+		MethodDescriptor[] mds = new MethodDescriptor[2];
+		try {
+			Method getMethod = clazz.getMethod("getText", null);
+			Method setMethod = clazz.getMethod("setText",
+					new Class[] { String.class });
+			mds[0] = new MethodDescriptor(getMethod);
+			mds[0].setName(mds[0].getName() + suffix);
+
+			mds[1] = new MethodDescriptor(setMethod);
+			mds[1].setName(mds[1].getName() + suffix);
+
+		} catch (SecurityException e) {
+			e.printStackTrace();
+		} catch (NoSuchMethodException e) {
+			e.printStackTrace();
+		}
+		return mds;
+	}
+
+	public EventSetDescriptor[] getEventSetDescriptors() {
+		EventSetDescriptor[] esds = new EventSetDescriptor[1];
+		try {
+			EventSetDescriptor esd = new EventSetDescriptor(clazz,
+					"mockPropertyChange", MockPropertyChangeListener.class,
+					"mockPropertyChange");
+			esd.setName(esd.getName() + suffix);
+			esds[0] = esd;
+		} catch (IntrospectionException e) {
+			e.printStackTrace();
+		}
+		return esds;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubSub.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubSub.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubSub.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockFooSubSub.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,39 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+/**
+ * test Introspector
+ */
+public class MockFooSubSub extends MockFooSub {
+
+	private int flags;
+
+	/**
+	 * @return Returns the flags.
+	 */
+	public int getFlags() {
+		return flags;
+	}
+
+	/**
+	 * @param flags
+	 *            The flags to set.
+	 */
+	public void setFlags(int flags) {
+		this.flags = flags;
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.bin
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.bin?rev=394923&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.bin
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.res
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.res?rev=394923&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockJavaBean2.res
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeEvent.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeEvent.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeEvent.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeEvent.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,38 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+import java.util.EventObject;
+
+/**
+ * test java.beans
+ */
+public class MockPropertyChangeEvent extends EventObject {
+
+	/**
+	 * @param source
+	 */
+	public MockPropertyChangeEvent(Object source) {
+		super(source);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * Comment for <code>serialVersionUID</code>
+	 */
+	private static final long serialVersionUID = 1L;
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeListener2.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeListener2.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeListener2.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockPropertyChangeListener2.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,30 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+/**
+ * test java.beans
+ */
+public interface MockPropertyChangeListener2 {
+	/*
+	 * fire MockPropertyChange event.
+	 */
+	public void mockPropertyChange(
+			tests.api.java.beans.MockPropertyChangeEvent e);
+
+	public void mockPropertyChange(
+			tests.api.java.beans.mock.MockPropertyChangeEvent e);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockSimpleBeanInfo.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockSimpleBeanInfo.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockSimpleBeanInfo.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/MockSimpleBeanInfo.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,25 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+import java.beans.SimpleBeanInfo;
+
+/**
+ * test SimpleBeanInfo
+ */
+public class MockSimpleBeanInfo extends SimpleBeanInfo {
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/NonSerializedVCListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/NonSerializedVCListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/NonSerializedVCListener.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/NonSerializedVCListener.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,54 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+
+/**
+ * test VetoableChangeSupport
+ */
+public class NonSerializedVCListener implements VetoableChangeListener {
+
+	String propertyName;
+
+	public NonSerializedVCListener(String propertyName) {
+		this.propertyName = propertyName;
+	}
+
+	public boolean equals(Object o) {
+		if (!(o instanceof NonSerializedVCListener)) {
+			return false;
+		}
+
+		NonSerializedVCListener other = (NonSerializedVCListener) o;
+		return (this.propertyName == null ? other.propertyName == null
+				: this.propertyName.equals(other.propertyName));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent)
+	 */
+	public void vetoableChange(PropertyChangeEvent event)
+			throws PropertyVetoException {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/SerializedVCListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/SerializedVCListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/SerializedVCListener.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/SerializedVCListener.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,59 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.beans.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.io.Serializable;
+
+/**
+ * test VetoableChangeSupport
+ */
+public class SerializedVCListener implements Serializable,
+		VetoableChangeListener {
+
+	String propertyName;
+
+	String name;
+
+	public SerializedVCListener(String propertyName) {
+		this.propertyName = propertyName;
+	}
+
+	public boolean equals(Object o) {
+		if (!(o instanceof SerializedVCListener)) {
+			return false;
+		}
+
+		SerializedVCListener other = (SerializedVCListener) o;
+		return ((this.name == null ? other.name == null : this.name
+				.equals(other.name)) && (this.propertyName == null ? other.propertyName == null
+				: this.propertyName.equals(other.propertyName)));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent)
+	 */
+	public void vetoableChange(PropertyChangeEvent event)
+			throws PropertyVetoException {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/harmony-logo.gif
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/harmony-logo.gif?rev=394923&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/mock/harmony-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/null.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/null.xml?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/null.xml
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/null.xml
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+
+<!-- Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+     
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+     
+         http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License. -->
+
+<java version="1.4.2_07" class="java.beans.XMLDecoder"> 
+ <null/> 
+</java> 

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/beans/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/beans/AllTests.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/beans/AllTests.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/beans/AllTests.java
Tue Apr 18 05:11:09 2006
@@ -0,0 +1,38 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.beans;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite that includes all tests for the Beans project.
+ */
+public class AllTests {
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTests.suite());
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("All Beans test suites");
+		// $JUnit-BEGIN$
+		suite.addTest(tests.api.java.beans.AllTests.suite());
+		suite.addTest(tests.api.java.beans.beancontext.AllTests.suite());
+		// $JUnit-END$
+		return suite;
+	}
+}



Mime
View raw message