harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r394923 [14/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/beancontext/mock/MockBeanContext.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContext.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContext.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContext.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,350 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextMembershipListener;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * Mock of BeanContext
+ */
+public class MockBeanContext implements BeanContext {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#instantiateChild(java.lang.String)
+	 */
+	public Object instantiateChild(String beanName) throws IOException,
+			ClassNotFoundException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#getResourceAsStream(java.lang.String,
+	 *      java.beans.beancontext.BeanContextChild)
+	 */
+	public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#getResource(java.lang.String,
+	 *      java.beans.beancontext.BeanContextChild)
+	 */
+	public URL getResource(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
+	 */
+	public void addBeanContextMembershipListener(
+			BeanContextMembershipListener bcml) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
+	 */
+	public void removeBeanContextMembershipListener(
+			BeanContextMembershipListener bcml) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#setBeanContext(java.beans.beancontext.BeanContext)
+	 */
+	public void setBeanContext(BeanContext bc) throws PropertyVetoException {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#getBeanContext()
+	 */
+	public BeanContext getBeanContext() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addPropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removePropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void addVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removeVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void removeVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#size()
+	 */
+	public int size() {
+		// Auto-generated method stub
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#isEmpty()
+	 */
+	public boolean isEmpty() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#contains(java.lang.Object)
+	 */
+	public boolean contains(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#iterator()
+	 */
+	public Iterator iterator() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#toArray()
+	 */
+	public Object[] toArray() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#toArray(java.lang.Object[])
+	 */
+	public Object[] toArray(Object[] a) {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#add(java.lang.Object)
+	 */
+	public boolean add(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#remove(java.lang.Object)
+	 */
+	public boolean remove(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#containsAll(java.util.Collection)
+	 */
+	public boolean containsAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#addAll(java.util.Collection)
+	 */
+	public boolean addAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#removeAll(java.util.Collection)
+	 */
+	public boolean removeAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#retainAll(java.util.Collection)
+	 */
+	public boolean retainAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#clear()
+	 */
+	public void clear() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.DesignMode#setDesignTime(boolean)
+	 */
+	public void setDesignTime(boolean designTime) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.DesignMode#isDesignTime()
+	 */
+	public boolean isDesignTime() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#needsGui()
+	 */
+	public boolean needsGui() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#dontUseGui()
+	 */
+	public void dontUseGui() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#okToUseGui()
+	 */
+	public void okToUseGui() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#avoidingGui()
+	 */
+	public boolean avoidingGui() {
+		// Auto-generated method stub
+		return false;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChild.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChild.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChild.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChild.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,97 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+
+/**
+ * Mock of BeanContextChild
+ */
+public class MockBeanContextChild implements
+		java.beans.beancontext.BeanContextChild {
+
+	private BeanContext ctx;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#setBeanContext(java.beans.beancontext.BeanContext)
+	 */
+	public void setBeanContext(BeanContext bc) throws PropertyVetoException {
+		ctx = bc;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#getBeanContext()
+	 */
+	public BeanContext getBeanContext() {
+		return ctx;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addPropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removePropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void addVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removeVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void removeVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildComponentProxy.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildComponentProxy.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildComponentProxy.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildComponentProxy.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,36 @@
+/* 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.beancontext.mock;
+
+import java.awt.Component;
+
+/**
+ * Mock of BeanContextChildComponentProxy
+ */
+public class MockBeanContextChildComponentProxy implements
+		java.beans.beancontext.BeanContextChildComponentProxy {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChildComponentProxy#getComponent()
+	 */
+	public Component getComponent() {
+		// Auto-generated method stub
+		return null;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildDelegateS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildDelegateS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildDelegateS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildDelegateS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,90 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextChildSupport;
+import java.io.Serializable;
+
+/**
+ * Delegate to BeanContextChildSupport
+ */
+public class MockBeanContextChildDelegateS implements BeanContextChild,
+		Serializable {
+
+	public String id;
+
+	public BeanContextChildSupport support = new BeanContextChildSupport(this);
+
+	public MockBeanContextChildDelegateS(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * @param name
+	 * @param pcl
+	 */
+	public void addPropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		support.addPropertyChangeListener(name, pcl);
+	}
+
+	/**
+	 * @param name
+	 * @param vcl
+	 */
+	public void addVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		support.addVetoableChangeListener(name, vcl);
+	}
+
+	/**
+	 * @return
+	 */
+	public BeanContext getBeanContext() {
+		return support.getBeanContext();
+	}
+
+	/**
+	 * @param name
+	 * @param pcl
+	 */
+	public void removePropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		support.removePropertyChangeListener(name, pcl);
+	}
+
+	/**
+	 * @param name
+	 * @param vcl
+	 */
+	public void removeVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		support.removeVetoableChangeListener(name, vcl);
+	}
+
+	/**
+	 * @param bc
+	 * @throws java.beans.PropertyVetoException
+	 */
+	public void setBeanContext(BeanContext bc) throws PropertyVetoException {
+		support.setBeanContext(bc);
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextChildS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,115 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+import java.beans.beancontext.BeanContextChild;
+import java.io.Serializable;
+
+/**
+ * Mock of BeanContextChild
+ */
+public class MockBeanContextChildS implements BeanContextChild, Serializable {
+
+	public String id;
+
+	private BeanContext ctx;
+
+	public MockBeanContextChildS(String id) {
+		this.id = id;
+	}
+
+	public boolean equals(Object o) {
+		if (o instanceof MockBeanContextChildS) {
+			return id.equals(((MockBeanContextChildS) o).id);
+		}
+		return false;
+	}
+
+	public int hashCode() {
+		return id.hashCode();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#setBeanContext(java.beans.beancontext.BeanContext)
+	 */
+	public void setBeanContext(BeanContext bc) throws PropertyVetoException {
+		ctx = bc;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#getBeanContext()
+	 */
+	public BeanContext getBeanContext() {
+		return ctx;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addPropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removePropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void addVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removeVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void removeVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextContainerProxy.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextContainerProxy.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextContainerProxy.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextContainerProxy.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,36 @@
+/* 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.beancontext.mock;
+
+import java.awt.Container;
+import java.beans.beancontext.BeanContextContainerProxy;
+
+/**
+ * Mock of BeanContextContainerProxy
+ */
+public class MockBeanContextContainerProxy implements BeanContextContainerProxy {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextContainerProxy#getContainer()
+	 */
+	public Container getContainer() {
+		// Auto-generated method stub
+		return null;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextDelegateS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextDelegateS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextDelegateS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextDelegateS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,430 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextMembershipListener;
+import java.beans.beancontext.BeanContextServiceAvailableEvent;
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
+import java.beans.beancontext.BeanContextSupport;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+
+/**
+ * Mock of BeanContext
+ */
+public class MockBeanContextDelegateS implements BeanContext, Serializable {
+
+	public BeanContextSupport support = new BeanContextSupport(this, Locale.US);
+
+	public String id;
+
+	public MockBeanContextDelegateS(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean add(Object arg0) {
+		return support.add(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean addAll(Collection arg0) {
+		return support.addAll(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void addBeanContextMembershipListener(
+			BeanContextMembershipListener arg0) {
+		support.addBeanContextMembershipListener(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public void addPropertyChangeListener(String arg0,
+			PropertyChangeListener arg1) {
+		support.addPropertyChangeListener(arg0, arg1);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public void addVetoableChangeListener(String arg0,
+			VetoableChangeListener arg1) {
+		support.addVetoableChangeListener(arg0, arg1);
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean avoidingGui() {
+		return support.avoidingGui();
+	}
+
+	/**
+	 * 
+	 */
+	public void clear() {
+		support.clear();
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean contains(Object arg0) {
+		return support.contains(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean containsAll(Collection arg0) {
+		return support.containsAll(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean containsKey(Object arg0) {
+		return support.containsKey(arg0);
+	}
+
+	/**
+	 * 
+	 */
+	public void dontUseGui() {
+		support.dontUseGui();
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 * @param arg2
+	 */
+	public void firePropertyChange(String arg0, Object arg1, Object arg2) {
+		support.firePropertyChange(arg0, arg1, arg2);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 * @param arg2
+	 * @throws java.beans.PropertyVetoException
+	 */
+	public void fireVetoableChange(String arg0, Object arg1, Object arg2)
+			throws PropertyVetoException {
+		support.fireVetoableChange(arg0, arg1, arg2);
+	}
+
+	/**
+	 * @return
+	 */
+	public BeanContext getBeanContext() {
+		return support.getBeanContext();
+	}
+
+	/**
+	 * @return
+	 */
+	public BeanContextChild getBeanContextChildPeer() {
+		return support.getBeanContextChildPeer();
+	}
+
+	/**
+	 * @return
+	 */
+	public BeanContext getBeanContextPeer() {
+		return support.getBeanContextPeer();
+	}
+
+	/**
+	 * @return
+	 */
+	public Locale getLocale() {
+		return support.getLocale();
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 * @return
+	 * @throws java.lang.IllegalArgumentException
+	 */
+	public URL getResource(String arg0, BeanContextChild arg1)
+			throws IllegalArgumentException {
+		return support.getResource(arg0, arg1);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 * @return
+	 * @throws java.lang.IllegalArgumentException
+	 */
+	public InputStream getResourceAsStream(String arg0, BeanContextChild arg1)
+			throws IllegalArgumentException {
+		return support.getResourceAsStream(arg0, arg1);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 * @throws java.io.IOException
+	 * @throws java.lang.ClassNotFoundException
+	 */
+	public Object instantiateChild(String arg0) throws IOException,
+			ClassNotFoundException {
+		return support.instantiateChild(arg0);
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isDelegated() {
+		return support.isDelegated();
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isDesignTime() {
+		return support.isDesignTime();
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isEmpty() {
+		return support.isEmpty();
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isSerializing() {
+		return support.isSerializing();
+	}
+
+	/**
+	 * @return
+	 */
+	public Iterator iterator() {
+		return support.iterator();
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean needsGui() {
+		return support.needsGui();
+	}
+
+	/**
+	 * 
+	 */
+	public void okToUseGui() {
+		support.okToUseGui();
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void propertyChange(PropertyChangeEvent arg0) {
+		support.propertyChange(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @throws java.io.IOException
+	 * @throws java.lang.ClassNotFoundException
+	 */
+	public void readChildren(ObjectInputStream arg0) throws IOException,
+			ClassNotFoundException {
+		support.readChildren(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean remove(Object arg0) {
+		return support.remove(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean removeAll(Collection arg0) {
+		return support.removeAll(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void removeBeanContextMembershipListener(
+			BeanContextMembershipListener arg0) {
+		support.removeBeanContextMembershipListener(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public void removePropertyChangeListener(String arg0,
+			PropertyChangeListener arg1) {
+		support.removePropertyChangeListener(arg0, arg1);
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public void removeVetoableChangeListener(String arg0,
+			VetoableChangeListener arg1) {
+		support.removeVetoableChangeListener(arg0, arg1);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean retainAll(Collection arg0) {
+		return support.retainAll(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void serviceAvailable(BeanContextServiceAvailableEvent arg0) {
+		support.serviceAvailable(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void serviceRevoked(BeanContextServiceRevokedEvent arg0) {
+		support.serviceRevoked(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @throws java.beans.PropertyVetoException
+	 */
+	public void setBeanContext(BeanContext arg0) throws PropertyVetoException {
+		support.setBeanContext(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public void setDesignTime(boolean arg0) {
+		support.setDesignTime(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @throws java.beans.PropertyVetoException
+	 */
+	public void setLocale(Locale arg0) throws PropertyVetoException {
+		support.setLocale(arg0);
+	}
+
+	/**
+	 * @return
+	 */
+	public int size() {
+		return support.size();
+	}
+
+	/**
+	 * @return
+	 */
+	public Object[] toArray() {
+		return support.toArray();
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public Object[] toArray(Object[] arg0) {
+		return support.toArray(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @return
+	 */
+	public boolean validatePendingSetBeanContext(BeanContext arg0) {
+		return support.validatePendingSetBeanContext(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @throws java.beans.PropertyVetoException
+	 */
+	public void vetoableChange(PropertyChangeEvent arg0)
+			throws PropertyVetoException {
+		support.vetoableChange(arg0);
+	}
+
+	/**
+	 * @param arg0
+	 * @throws java.io.IOException
+	 */
+	public void writeChildren(ObjectOutputStream arg0) throws IOException {
+		support.writeChildren(arg0);
+	}
+
+	private void writeObject(ObjectOutputStream oos) throws IOException {
+		oos.defaultWriteObject();
+		support.writeChildren(oos);
+	}
+
+	private void readObject(ObjectInputStream ois) throws IOException,
+			ClassNotFoundException {
+		ois.defaultReadObject();
+		support.readChildren(ois);
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListener.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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextMembershipEvent;
+import java.beans.beancontext.BeanContextMembershipListener;
+
+/**
+ * Mock of BeanContextMembershipListener
+ */
+public class MockBeanContextMembershipListener implements
+		BeanContextMembershipListener {
+
+	public boolean lastEventAdd = false;
+
+	public boolean lastEventRemove = false;
+
+	public BeanContextMembershipEvent lastEvent;
+
+	public void clearLastEvent() {
+		lastEventAdd = false;
+		lastEventRemove = false;
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextMembershipListener#childrenAdded(java.beans.beancontext.BeanContextMembershipEvent)
+	 */
+	public void childrenAdded(BeanContextMembershipEvent bcme) {
+		lastEventAdd = true;
+		lastEvent = bcme;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextMembershipListener#childrenRemoved(java.beans.beancontext.BeanContextMembershipEvent)
+	 */
+	public void childrenRemoved(BeanContextMembershipEvent bcme) {
+		lastEventRemove = true;
+		lastEvent = bcme;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListenerS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListenerS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListenerS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextMembershipListenerS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,66 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextMembershipEvent;
+import java.beans.beancontext.BeanContextMembershipListener;
+import java.io.Serializable;
+
+/**
+ * Mock of BeanContextMembershipListener
+ */
+public class MockBeanContextMembershipListenerS implements
+		BeanContextMembershipListener, Serializable {
+
+	public String id;
+
+	public boolean lastEventAdd = false;
+
+	public boolean lastEventRemove = false;
+
+	public BeanContextMembershipEvent lastEvent;
+
+	public MockBeanContextMembershipListenerS(String id) {
+		this.id = id;
+	}
+
+	public void clearLastEvent() {
+		lastEventAdd = false;
+		lastEventRemove = false;
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextMembershipListener#childrenAdded(java.beans.beancontext.BeanContextMembershipEvent)
+	 */
+	public void childrenAdded(BeanContextMembershipEvent bcme) {
+		lastEventAdd = true;
+		lastEvent = bcme;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextMembershipListener#childrenRemoved(java.beans.beancontext.BeanContextMembershipEvent)
+	 */
+	public void childrenRemoved(BeanContextMembershipEvent bcme) {
+		lastEventRemove = true;
+		lastEvent = bcme;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxy.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxy.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxy.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxy.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,45 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextProxy;
+
+/**
+ * Mock of BeanContextProxy
+ */
+public class MockBeanContextProxy implements BeanContextProxy {
+
+	private BeanContextChild bcc;
+
+	public MockBeanContextProxy() {
+		this(null);
+	}
+
+	public MockBeanContextProxy(BeanContextChild bcc) {
+		this.bcc = bcc;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextProxy#getBeanContextProxy()
+	 */
+	public BeanContextChild getBeanContextProxy() {
+		return bcc;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxyS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxyS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxyS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextProxyS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,57 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextProxy;
+import java.io.Serializable;
+
+/**
+ * Mock of BeanContextProxy
+ */
+public class MockBeanContextProxyS implements BeanContextProxy, Serializable {
+
+	private String id;
+
+	private BeanContextChild bcc;
+
+	public MockBeanContextProxyS(String id, BeanContextChild bcc) {
+		this.id = id;
+		this.bcc = bcc;
+	}
+
+	public boolean equals(Object o) {
+		if (o instanceof MockBeanContextProxyS) {
+			MockBeanContextProxyS other = (MockBeanContextProxyS) o;
+			return id.equals(other.id) && bcc.equals(other.bcc);
+		}
+		return false;
+	}
+
+	public int hashCode() {
+		return id.hashCode() + bcc.hashCode();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextProxy#getBeanContextProxy()
+	 */
+	public BeanContextChild getBeanContextProxy() {
+		return bcc;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProvider.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProvider.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProvider.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProvider.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,75 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import tests.api.java.beans.beancontext.MethodInvocationRecords;
+
+/**
+ * Mock of BeanContextServiceProvider
+ */
+public class MockBeanContextServiceProvider implements
+		BeanContextServiceProvider {
+
+	public MethodInvocationRecords records = new MethodInvocationRecords();
+
+	public List selectors = Arrays.asList(new Object[] { Integer.class });
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#getService(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Object, java.lang.Class, java.lang.Object)
+	 */
+	public Object getService(BeanContextServices bcs, Object requestor,
+			Class serviceClass, Object serviceSelector) {
+		Object result = Collections.EMPTY_SET;
+		records.add("getService", bcs, requestor, serviceClass,
+				serviceSelector, result);
+		return result;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#releaseService(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Object, java.lang.Object)
+	 */
+	public void releaseService(BeanContextServices bcs, Object requestor,
+			Object service) {
+		records.add("releaseService", bcs, requestor, service, null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Class)
+	 */
+	public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
+			Class serviceClass) {
+		Iterator result = selectors.iterator();
+		records.add("getCurrentServiceSelectors", bcs, serviceClass, result);
+		return result;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderBeanInfo.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderBeanInfo.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderBeanInfo.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderBeanInfo.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,122 @@
+/* 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.beancontext.mock;
+
+import java.awt.Image;
+import java.beans.BeanDescriptor;
+import java.beans.BeanInfo;
+import java.beans.EventSetDescriptor;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyDescriptor;
+import java.beans.beancontext.BeanContextServiceProviderBeanInfo;
+
+/**
+ * Mock of BeanContextServiceProviderBeanInfo
+ */
+public class MockBeanContextServiceProviderBeanInfo implements
+		BeanContextServiceProviderBeanInfo {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProviderBeanInfo#getServicesBeanInfo()
+	 */
+	public BeanInfo[] getServicesBeanInfo() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getBeanDescriptor()
+	 */
+	public BeanDescriptor getBeanDescriptor() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getEventSetDescriptors()
+	 */
+	public EventSetDescriptor[] getEventSetDescriptors() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getDefaultEventIndex()
+	 */
+	public int getDefaultEventIndex() {
+		// Auto-generated method stub
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getPropertyDescriptors()
+	 */
+	public PropertyDescriptor[] getPropertyDescriptors() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getDefaultPropertyIndex()
+	 */
+	public int getDefaultPropertyIndex() {
+		// Auto-generated method stub
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getMethodDescriptors()
+	 */
+	public MethodDescriptor[] getMethodDescriptors() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getAdditionalBeanInfo()
+	 */
+	public BeanInfo[] getAdditionalBeanInfo() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.BeanInfo#getIcon(int)
+	 */
+	public Image getIcon(int iconKind) {
+		// Auto-generated method stub
+		return null;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceProviderS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,68 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.io.Serializable;
+import java.util.Iterator;
+
+/**
+ * Mock of BeanContextServiceProvider
+ */
+public class MockBeanContextServiceProviderS implements
+		BeanContextServiceProvider, Serializable {
+
+	public String id;
+
+	public MockBeanContextServiceProviderS(String id) {
+		this.id = id;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#getService(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Object, java.lang.Class, java.lang.Object)
+	 */
+	public Object getService(BeanContextServices bcs, Object requestor,
+			Class serviceClass, Object serviceSelector) {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#releaseService(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Object, java.lang.Object)
+	 */
+	public void releaseService(BeanContextServices bcs, Object requestor,
+			Object service) {
+		// nothing
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceProvider#getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices,
+	 *      java.lang.Class)
+	 */
+	public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
+			Class serviceClass) {
+		return null;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceRevokedListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceRevokedListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceRevokedListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServiceRevokedListener.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,42 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
+import java.beans.beancontext.BeanContextServiceRevokedListener;
+
+/**
+ * Mock of BeanContextServiceRevokedListener
+ */
+public class MockBeanContextServiceRevokedListener implements
+		BeanContextServiceRevokedListener {
+
+	public BeanContextServiceRevokedEvent lastEvent;
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceRevokedListener#serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
+	 */
+	public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) {
+		lastEvent = bcsre;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServices.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServices.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServices.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServices.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,485 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.beancontext.BeanContext;
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextMembershipListener;
+import java.beans.beancontext.BeanContextServiceAvailableEvent;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
+import java.beans.beancontext.BeanContextServiceRevokedListener;
+import java.beans.beancontext.BeanContextServices;
+import java.beans.beancontext.BeanContextServicesListener;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.TooManyListenersException;
+
+/**
+ * Mock of BeanContextServices
+ */
+public class MockBeanContextServices implements BeanContextServices {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#addService(java.lang.Class,
+	 *      java.beans.beancontext.BeanContextServiceProvider)
+	 */
+	public boolean addService(Class serviceClass,
+			BeanContextServiceProvider serviceProvider) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#revokeService(java.lang.Class,
+	 *      java.beans.beancontext.BeanContextServiceProvider, boolean)
+	 */
+	public void revokeService(Class serviceClass,
+			BeanContextServiceProvider serviceProvider,
+			boolean revokeCurrentServicesNow) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#hasService(java.lang.Class)
+	 */
+	public boolean hasService(Class serviceClass) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#getService(java.beans.beancontext.BeanContextChild,
+	 *      java.lang.Object, java.lang.Class, java.lang.Object,
+	 *      java.beans.beancontext.BeanContextServiceRevokedListener)
+	 */
+	public Object getService(BeanContextChild child, Object requestor,
+			Class serviceClass, Object serviceSelector,
+			BeanContextServiceRevokedListener bcsrl)
+			throws TooManyListenersException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#releaseService(java.beans.beancontext.BeanContextChild,
+	 *      java.lang.Object, java.lang.Object)
+	 */
+	public void releaseService(BeanContextChild child, Object requestor,
+			Object service) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#getCurrentServiceClasses()
+	 */
+	public Iterator getCurrentServiceClasses() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#getCurrentServiceSelectors(java.lang.Class)
+	 */
+	public Iterator getCurrentServiceSelectors(Class serviceClass) {
+		// Auto-generated method stub
+		ArrayList list = new ArrayList();
+		list.add("1");
+		list.add("2");
+		list.add("3");
+		return list.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#addBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
+	 */
+	public void addBeanContextServicesListener(BeanContextServicesListener bcsl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServices#removeBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
+	 */
+	public void removeBeanContextServicesListener(
+			BeanContextServicesListener bcsl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#instantiateChild(java.lang.String)
+	 */
+	public Object instantiateChild(String beanName) throws IOException,
+			ClassNotFoundException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#getResourceAsStream(java.lang.String,
+	 *      java.beans.beancontext.BeanContextChild)
+	 */
+	public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#getResource(java.lang.String,
+	 *      java.beans.beancontext.BeanContextChild)
+	 */
+	public URL getResource(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
+	 */
+	public void addBeanContextMembershipListener(
+			BeanContextMembershipListener bcml) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContext#removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
+	 */
+	public void removeBeanContextMembershipListener(
+			BeanContextMembershipListener bcml) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServicesListener#serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
+	 */
+	public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#setBeanContext(java.beans.beancontext.BeanContext)
+	 */
+	public void setBeanContext(BeanContext bc) throws PropertyVetoException {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#getBeanContext()
+	 */
+	public BeanContext getBeanContext() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addPropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void addPropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removePropertyChangeListener(java.lang.String,
+	 *      java.beans.PropertyChangeListener)
+	 */
+	public void removePropertyChangeListener(String name,
+			PropertyChangeListener pcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#addVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void addVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextChild#removeVetoableChangeListener(java.lang.String,
+	 *      java.beans.VetoableChangeListener)
+	 */
+	public void removeVetoableChangeListener(String name,
+			VetoableChangeListener vcl) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#size()
+	 */
+	public int size() {
+		// Auto-generated method stub
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#isEmpty()
+	 */
+	public boolean isEmpty() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#contains(java.lang.Object)
+	 */
+	public boolean contains(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#iterator()
+	 */
+	public Iterator iterator() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#toArray()
+	 */
+	public Object[] toArray() {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#toArray(java.lang.Object[])
+	 */
+	public Object[] toArray(Object[] a) {
+		// Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#add(java.lang.Object)
+	 */
+	public boolean add(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#remove(java.lang.Object)
+	 */
+	public boolean remove(Object o) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#containsAll(java.util.Collection)
+	 */
+	public boolean containsAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#addAll(java.util.Collection)
+	 */
+	public boolean addAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#removeAll(java.util.Collection)
+	 */
+	public boolean removeAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#retainAll(java.util.Collection)
+	 */
+	public boolean retainAll(Collection c) {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Collection#clear()
+	 */
+	public void clear() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.DesignMode#setDesignTime(boolean)
+	 */
+	public void setDesignTime(boolean designTime) {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.DesignMode#isDesignTime()
+	 */
+	public boolean isDesignTime() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#needsGui()
+	 */
+	public boolean needsGui() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#dontUseGui()
+	 */
+	public void dontUseGui() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#okToUseGui()
+	 */
+	public void okToUseGui() {
+		// Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#avoidingGui()
+	 */
+	public boolean avoidingGui() {
+		// Auto-generated method stub
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceRevokedListener#serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
+	 */
+	public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) {
+		// Auto-generated method stub
+
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListener.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,55 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextServiceAvailableEvent;
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
+import java.beans.beancontext.BeanContextServicesListener;
+
+/**
+ * Mock of BeanContextServicesListener
+ */
+public class MockBeanContextServicesListener implements
+		BeanContextServicesListener {
+
+	public BeanContextServiceAvailableEvent lastAvailableEvent;
+
+	public BeanContextServiceRevokedEvent lastRevokedEvent;
+
+	public void clearLastEvent() {
+		lastAvailableEvent = null;
+		lastRevokedEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServicesListener#serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
+	 */
+	public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) {
+		lastAvailableEvent = bcsae;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceRevokedListener#serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
+	 */
+	public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) {
+		lastRevokedEvent = bcsre;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListenerS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListenerS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListenerS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockBeanContextServicesListenerS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,53 @@
+/* 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.beancontext.mock;
+
+import java.beans.beancontext.BeanContextServiceAvailableEvent;
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
+import java.beans.beancontext.BeanContextServicesListener;
+import java.io.Serializable;
+
+/**
+ * Mock of BeanContextServicesListener
+ */
+public class MockBeanContextServicesListenerS implements
+		BeanContextServicesListener, Serializable {
+
+	public String id;
+
+	public MockBeanContextServicesListenerS(String id) {
+		this.id = id;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServicesListener#serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
+	 */
+	public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) {
+		// nothing
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.beancontext.BeanContextServiceRevokedListener#serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
+	 */
+	public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) {
+		// nothing
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListener.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,41 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+/**
+ * Mock of PropertyChangeListener
+ */
+public class MockPropertyChangeListener implements PropertyChangeListener {
+
+	public PropertyChangeEvent lastEvent;
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+	 */
+	public void propertyChange(PropertyChangeEvent evt) {
+		lastEvent = evt;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListenerS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListenerS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListenerS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockPropertyChangeListenerS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,49 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.Serializable;
+
+/**
+ * Mock of PropertyChangeListener
+ */
+public class MockPropertyChangeListenerS implements PropertyChangeListener,
+		Serializable {
+
+	public PropertyChangeEvent lastEvent;
+
+	public String id;
+
+	public MockPropertyChangeListenerS(String id) {
+		this.id = id;
+	}
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+	 */
+	public void propertyChange(PropertyChangeEvent evt) {
+		lastEvent = evt;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoChangeListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoChangeListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoChangeListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoChangeListener.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,44 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+
+/**
+ * Mock of VetoableChangeListener
+ */
+public class MockVetoChangeListener implements VetoableChangeListener {
+
+	public PropertyChangeEvent lastEvent;
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent)
+	 */
+	public void vetoableChange(PropertyChangeEvent evt)
+			throws PropertyVetoException {
+		lastEvent = evt;
+		throw new PropertyVetoException("NO CHANGE ALLOWED", evt);
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListener.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListener.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,43 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+
+/**
+ * Mock of VetoableChangeListener
+ */
+public class MockVetoableChangeListener implements VetoableChangeListener {
+
+	public PropertyChangeEvent lastEvent;
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent)
+	 */
+	public void vetoableChange(PropertyChangeEvent evt)
+			throws PropertyVetoException {
+		lastEvent = evt;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListenerS.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListenerS.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListenerS.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVetoableChangeListenerS.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,51 @@
+/* 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.beancontext.mock;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.io.Serializable;
+
+/**
+ * Mock of VetoableChangeListener
+ */
+public class MockVetoableChangeListenerS implements VetoableChangeListener,
+		Serializable {
+
+	public PropertyChangeEvent lastEvent;
+
+	public String id;
+
+	public MockVetoableChangeListenerS(String id) {
+		this.id = id;
+	}
+
+	public void clearLastEvent() {
+		lastEvent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent)
+	 */
+	public void vetoableChange(PropertyChangeEvent evt)
+			throws PropertyVetoException {
+		lastEvent = evt;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVisibility.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVisibility.java?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVisibility.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/MockVisibility.java Tue Apr 18 05:11:09 2006
@@ -0,0 +1,72 @@
+/* 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.beancontext.mock;
+
+import java.beans.Visibility;
+
+/**
+ * Test Visibility
+ */
+public class MockVisibility implements Visibility {
+
+	public boolean avoidingGui;
+
+	public boolean needsGui;
+
+	public boolean okToUseGui;
+
+	public MockVisibility(boolean avoiding, boolean needs) {
+		this.avoidingGui = avoiding;
+		this.needsGui = needs;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#avoidingGui()
+	 */
+	public boolean avoidingGui() {
+		return avoidingGui;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#dontUseGui()
+	 */
+	public void dontUseGui() {
+		okToUseGui = false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#needsGui()
+	 */
+	public boolean needsGui() {
+		return needsGui;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.beans.Visibility#okToUseGui()
+	 */
+	public void okToUseGui() {
+		okToUseGui = true;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/mockdata.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/mockdata.txt?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/mockdata.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/beancontext/mock/mockdata.txt Tue Apr 18 05:11:09 2006
@@ -0,0 +1,2 @@
+mockdata
+(don't modify)
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/int.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/int.xml?rev=394923&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/int.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/int.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"> 
+ <int>3</int> 
+</java> 



Mime
View raw message