Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseberle2008-04-15 21:07:43 +0000
committerseberle2008-04-15 21:07:43 +0000
commit8c3f4991c3c78da4d8173f6d18a0304e2193588f (patch)
tree8f9e88aaaf9d93f049473b55be0e6b84a2198d19
parentfe68170accd03dafd74cfb4143c1f7b3eb9b7dfd (diff)
downloadorg.eclipse.emf.teneo-8c3f4991c3c78da4d8173f6d18a0304e2193588f.tar.gz
org.eclipse.emf.teneo-8c3f4991c3c78da4d8173f6d18a0304e2193588f.tar.xz
org.eclipse.emf.teneo-8c3f4991c3c78da4d8173f6d18a0304e2193588f.zip
Initial import
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.classpath7
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.project28
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/META-INF/MANIFEST.MF14
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/build.properties4
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/plugin.properties15
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/AllTests.java28
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/IndirectEListTest.java571
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/AllTests.java29
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/IndirectEMapTest.java542
-rw-r--r--tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/tests/AllTests.java29
14 files changed, 1286 insertions, 0 deletions
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.classpath b/tests/org.eclipse.emf.teneo.eclipselink.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.cvsignore b/tests/org.eclipse.emf.teneo.eclipselink.tests/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.project b/tests/org.eclipse.emf.teneo.eclipselink.tests/.project
new file mode 100644
index 000000000..5f89f49eb
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.teneo.eclipselink.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..03710d336
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Tue Oct 12 14:12:28 CEST 2004
+eclipse.preferences.version=1
+
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..4089dc6e4
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Feb 24 08:55:57 CET 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..412b55da4
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Fri Feb 24 08:55:57 CET 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.teneo.eclipselink.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5d265bbd5
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.teneo.eclipselink.tests;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.teneo.eclipselink,
+ org.junit
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/build.properties b/tests/org.eclipse.emf.teneo.eclipselink.tests/build.properties
new file mode 100644
index 000000000..34d2e4d2d
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/plugin.properties b/tests/org.eclipse.emf.teneo.eclipselink.tests/plugin.properties
new file mode 100644
index 000000000..f88bf432e
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/plugin.properties
@@ -0,0 +1,15 @@
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = EMF Teneo EclipseLink Tests Plug-in
+providerName = Eclipse.org
+
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/AllTests.java b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/AllTests.java
new file mode 100644
index 000000000..0bad9d38a
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/AllTests.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle and Geensys.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle and Geensys - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.teneo.eclipselink.elist.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "org.eclipse.emf.teneo.eclipselink.elist.test");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(IndirectEListTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/IndirectEListTest.java b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/IndirectEListTest.java
new file mode 100644
index 000000000..b5a9682dd
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/elist/tests/IndirectEListTest.java
@@ -0,0 +1,571 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle and Geensys.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle and Geensys - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.teneo.eclipselink.elist.tests;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+
+import org.eclipse.emf.teneo.eclipselink.elist.IndirectEList;
+import org.eclipse.persistence.internal.helper.Helper;
+import org.eclipse.persistence.internal.security.PrivilegedAccessHelper;
+
+
+public class IndirectEListTest extends TestCase {
+ @SuppressWarnings("serial")
+ protected static final class TestEmfIndirectEList<E> extends IndirectEList<E> {
+ public boolean isDelegateNull() {
+ return delegate == null;
+ }
+ }
+
+ protected Field delegateField = null;
+ protected TestEmfIndirectEList<Object> indirectEList;
+
+ public IndirectEListTest(String arg0) {
+ super(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ delegateField = Helper.getField(IndirectEList.class, "delegate");
+ indirectEList = new TestEmfIndirectEList<Object>();
+ }
+
+ protected void assertDelegateInstantiated() throws Exception {
+ Object delegate = getDelegateFromIndirectEList();
+ assertNotNull("delegate should be instantiated", delegate);
+ }
+
+ protected void assertDelegateNotInstantiated()throws Exception {
+ Object delegate = getDelegateFromIndirectEList();
+ assertNull("delegate should not be instantiated", delegate);
+ }
+
+ Object getDelegateFromIndirectEList() throws IllegalAccessException {
+ return PrivilegedAccessHelper.getValueFromField(delegateField, indirectEList);
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.hashCode()'
+ */
+ public void testHashCode() throws Exception {
+ indirectEList.hashCode();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.size()'
+ */
+ public void testSize() throws Exception {
+ indirectEList.size();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.isEmpty()'
+ */
+ public void testIsEmpty() throws Exception {
+ indirectEList.isEmpty();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.clear()'
+ */
+ public void testClear() throws Exception {
+ indirectEList.clear();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicListIterator(int)'
+ */
+ public void testBasicListIteratorInt() throws Exception {
+ try {
+ indirectEList.basicListIterator(10);
+ fail("Removing from temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicIterator()'
+ */
+ public void testBasicIterator() throws Exception {
+ indirectEList.basicIterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicListIterator()'
+ */
+ public void testBasicListIterator() throws Exception {
+ indirectEList.basicListIterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicList()'
+ */
+ public void testBasicList() throws Exception {
+ indirectEList.basicList();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicRemove(Object, NotificationChain)'
+ */
+ public void testBasicRemove() throws Exception {
+ try {
+ indirectEList.basicRemove(null, null);
+ fail("Removing from temporary EclipseLinkEList should throw an exception.");
+ } catch (RuntimeException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicAdd(Object, NotificationChain)'
+ */
+ public void testBasicAdd() throws Exception {
+ try {
+ indirectEList.basicAdd(null, null);
+ fail("Adding to a temporary EclipseLinkEList should throw an exception.");
+ } catch (RuntimeException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.add(int, Object)'
+ */
+ public void testAddIntObject() throws Exception {
+ try {
+ indirectEList.add(1,null);
+ fail("Adding to a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.add(Object)'
+ */
+ public void testAddObject() throws Exception {
+ indirectEList.add(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.addAll(int, Collection)'
+ */
+ public void testAddAllIntCollection() throws Exception {
+ try {
+ indirectEList.addAll(1, new ArrayList<Object>());
+ fail("Adding to a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.addAll(Collection)'
+ */
+ public void testAddAllCollection() throws Exception {
+ indirectEList.addAll(new ArrayList<Object>());
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.clone()'
+ */
+ public void testClone() throws Exception {
+ indirectEList.clone();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.contains(Object)'
+ */
+ public void testContainsObject() throws Exception {
+ indirectEList.contains(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.containsAll(Collection)'
+ */
+ public void testContainsAllCollection() throws Exception {
+ indirectEList.containsAll(new ArrayList<Object>());
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.equals(Object)'
+ */
+ public void testEqualsObject() throws Exception {
+ indirectEList.equals(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.get(int)'
+ */
+ public void testGetInt() throws Exception {
+ try {
+ indirectEList.get(0);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.getValueHolder()'
+ */
+ public void testGetValueHolder() throws Exception {
+ indirectEList.getValueHolder();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.hasBeenRegistered()'
+ */
+ public void testHasBeenRegistered() throws Exception {
+ indirectEList.hasBeenRegistered();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.indexOf(Object)'
+ */
+ public void testIndexOfObject() throws Exception {
+ indirectEList.indexOf(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.isInstantiated()'
+ */
+ public void testIsInstantiated() throws Exception {
+ indirectEList.isInstantiated();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.iterator()'
+ */
+ public void testIterator() throws Exception {
+ indirectEList.iterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.lastIndexOf(Object)'
+ */
+ public void testLastIndexOfObject() throws Exception {
+ indirectEList.lastIndexOf(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.listIterator()'
+ */
+ public void testListIterator() throws Exception {
+ indirectEList.listIterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.listIterator(int)'
+ */
+ public void testListIteratorInt() throws Exception {
+ try{
+ indirectEList.listIterator(10);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.remove(int)'
+ */
+ public void testRemoveInt() throws Exception {
+ try {
+ indirectEList.remove(1);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.remove(Object)'
+ */
+ public void testRemoveObject() throws Exception {
+ indirectEList.remove(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.removeAll(Collection)'
+ */
+ public void testRemoveAllCollection() throws Exception {
+ indirectEList.removeAll(new ArrayList<Object>());
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.removeElement(Object)'
+ */
+ public void testRemoveElement() throws Exception {
+ indirectEList.removeElement(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.removeElementAt(int)'
+ */
+ public void testRemoveElementAt() throws Exception {
+ try {
+ indirectEList.removeElementAt(1);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.retainAll(Collection)'
+ */
+ public void testRetainAllCollection() throws Exception {
+ indirectEList.retainAll(new ArrayList<Object>());
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.set(int, Object)'
+ */
+ public void testSetIntObject() throws Exception {
+ try {
+ indirectEList.set(1,null);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.setElementAt(Object, int)'
+ */
+ public void testSetElementAt() throws Exception {
+ try {
+ indirectEList.setElementAt(null, 1);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.setValueHolder(ValueHolderInterface)'
+ */
+ public void testSetValueHolder() throws Exception {
+ indirectEList.setValueHolder(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.subList(int, int)'
+ */
+ public void testSubListIntInt() throws Exception {
+ try {
+ indirectEList.subList(1,2);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.toArray()'
+ */
+ public void testToArray() throws Exception {
+ indirectEList.toArray();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.toArray(Object[])'
+ */
+ public void testToArrayObjectArray() throws Exception {
+ indirectEList.toArray(new Object[]{});
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.toString()'
+ */
+ public void testToString() throws Exception {
+ indirectEList.toString();
+ // ValueHolder class (not QueryBasedValueHolder and other
+ // value holders that lazily load objects) always say
+ // they are instantiated which will result in the instantiation
+ // of an empty List in the ValueHolder
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.getEclipseLinkPropertyChangeListener()'
+ */
+ public void testGetEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEList.getEclipseLinkPropertyChangeListener();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.hasEclipseLinkPropertyChangeListener()'
+ */
+ public void testHasEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEList.hasEclipseLinkPropertyChangeListener();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.setEclipseLinkPropertyChangeListener(PropertyChangeListener)'
+ */
+ public void testSetEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEList.setEclipseLinkPropertyChangeListener(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.getEclipseLinkAttributeName()'
+ */
+ public void testGetEclipseLinkAttributeName() throws Exception {
+ indirectEList.getEclipseLinkAttributeName();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.setEclipseLinkAttributeName(String)'
+ */
+ public void testSetEclipseLinkAttributeName() throws Exception {
+ indirectEList.setEclipseLinkAttributeName(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.move(int, Object)'
+ */
+ public void testMoveIntObject() throws Exception {
+ try {
+ indirectEList.move(1,null);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.move(int, int)'
+ */
+ public void testMoveIntInt() throws Exception {
+ try {
+ indirectEList.move(1,2);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.addUnique(int, Object)'
+ */
+ public void testAddUniqueIntObject() throws Exception {
+ try {
+ indirectEList.addUnique(1, null);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.addUnique(Object)'
+ */
+ public void testAddUniqueObject() throws Exception {
+ indirectEList.addUnique(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.basicGet(int)'
+ */
+ public void testBasicGetInt() throws Exception {
+ try {
+ indirectEList.basicGet(0);
+ fail("Using a temporary EclipseLinkEList should throw an exception.");
+ } catch (IndexOutOfBoundsException e) {
+ // expected but we are only testing for delegate instantiation
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.setUnique(int, Object)'
+ */
+ public void testSetUniqueIntObject() throws Exception {
+ indirectEList.setUnique(0, null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.ensureCapacity(int)'
+ */
+ public void testEnsureCapacity() throws Exception {
+ indirectEList.ensureCapacity(1);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.elist.EmfIndirectEList.trimToSize()'
+ */
+ public void testTrimToSize() throws Exception {
+ indirectEList.trimToSize();
+ assertDelegateNotInstantiated();
+ }
+
+}
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/AllTests.java b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/AllTests.java
new file mode 100644
index 000000000..2c281e35c
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/AllTests.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle and Geensys.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle and Geensys - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.teneo.eclipselink.emap.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "org.eclipse.emf.teneo.eclipselink.emap.test");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(IndirectEMapTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/IndirectEMapTest.java b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/IndirectEMapTest.java
new file mode 100644
index 000000000..72f724fc4
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/emap/tests/IndirectEMapTest.java
@@ -0,0 +1,542 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle and Geensys.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle and Geensys - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.teneo.eclipselink.emap.tests;
+
+import java.lang.reflect.Field;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.teneo.eclipselink.emap.IndirectEMap;
+import org.eclipse.persistence.internal.helper.Helper;
+import org.eclipse.persistence.internal.security.PrivilegedAccessHelper;
+
+
+public class IndirectEMapTest extends TestCase {
+ @SuppressWarnings("serial")
+ protected static final class TestEmfIndirectEMap<K, V> extends IndirectEMap<K, V> {
+ public boolean isDelegateNull() {
+ return delegate == null;
+ }
+ }
+
+ protected Field delegateField = null;
+ protected TestEmfIndirectEMap<Object, Object> indirectEMap;
+
+ public IndirectEMapTest(String arg0) {
+ super(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ delegateField = Helper.getField(IndirectEMap.class, "delegate");
+ indirectEMap = new TestEmfIndirectEMap<Object, Object>();
+ }
+
+ protected void assertDelegateInstantiated() throws Exception {
+ Object delegate = getDelegateFromIndirectEMap();
+ assertNotNull("delegate should be instantiated", delegate);
+ }
+
+ protected void assertDelegateNotInstantiated()throws Exception {
+ Object delegate = getDelegateFromIndirectEMap();
+ assertNull("delegate should not be instantiated", delegate);
+ }
+
+ Object getDelegateFromIndirectEMap() throws IllegalAccessException {
+ return PrivilegedAccessHelper.getValueFromField(delegateField, indirectEMap);
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.hashCode()'
+ */
+ public void testHashCode() throws Exception {
+ indirectEMap.hashCode();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.size()'
+ */
+ public void testSize() throws Exception {
+ indirectEMap.size();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.isEmpty()'
+ */
+ public void testIsEmpty() throws Exception {
+ indirectEMap.isEmpty();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.clear()'
+ */
+ public void testClear() throws Exception {
+ indirectEMap.clear();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.EmfIndirectEMap()'
+ */
+ public void testEmfIndirectEMap() throws Exception {
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.EmfIndirectEMap(int)'
+ */
+ public void testEmfIndirectEMapInt() throws Exception {
+
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.EmfIndirectEMap(int, float)'
+ */
+ public void testEmfIndirectEMapIntFloat() throws Exception {
+
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.EmfIndirectEMap(Map)'
+ */
+ public void testEmfIndirectEMapMap() throws Exception {
+
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.clone()'
+ */
+ public void testClone() throws Exception {
+ indirectEMap.clone();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.contains(Object)'
+ */
+ public void testContainsObject() throws Exception {
+ indirectEMap.contains(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.containsKey(Object)'
+ */
+ public void testContainsKeyObject() throws Exception {
+ indirectEMap.containsKey(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.containsValue(Object)'
+ */
+ public void testContainsValueObject() throws Exception {
+ indirectEMap.containsValue(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.entrySet()'
+ */
+ public void testEntrySet() throws Exception {
+ indirectEMap.entrySet();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.equals(Object)'
+ */
+ public void testEqualsObject() throws Exception {
+ indirectEMap.equals(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.get(Object)'
+ */
+ public void testGetObject() throws Exception {
+ indirectEMap.get(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.getEclipseLinkAttributeName()'
+ */
+ public void testGetEclipseLinkAttributeName() throws Exception {
+ indirectEMap.getEclipseLinkAttributeName();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.getEclipseLinkPropertyChangeListener()'
+ */
+ public void testGetEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEMap.getEclipseLinkPropertyChangeListener();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.getValueHolder()'
+ */
+ public void testGetValueHolder() throws Exception {
+ indirectEMap.getValueHolder();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.hasEclipseLinkPropertyChangeListener()'
+ */
+ public void testHasEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEMap.hasEclipseLinkPropertyChangeListener();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.isInstantiated()'
+ */
+ public void testIsInstantiated() throws Exception {
+ indirectEMap.isInstantiated();
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.keySet()'
+ */
+ public void testKeySet() throws Exception {
+ indirectEMap.keySet();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.put(Object, Object)'
+ */
+ public void testPutObjectObject() throws Exception {
+ indirectEMap.put(null, null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.putAll(Map)'
+ */
+ public void testPutAllMap() throws Exception {
+ try {
+ indirectEMap.putAll((Map<?, ?>)null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.remove(int)'
+ */
+ public void testRemoveInt() throws Exception {
+ try {
+ indirectEMap.remove(0);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.remove(Object)'
+ */
+ public void testRemoveObject() throws Exception {
+ indirectEMap.remove(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.removeAll(Collection)'
+ */
+ public void testRemoveAllCollection() throws Exception {
+ indirectEMap.removeAll(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.removeKey(Object)'
+ */
+ public void testRemoveKeyObject() throws Exception {
+ indirectEMap.removeKey(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.setEclipseLinkAttributeName(String)'
+ */
+ public void testSetEclipseLinkAttributeName() throws Exception {
+ indirectEMap.setEclipseLinkAttributeName(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.setEclipseLinkPropertyChangeListener(PropertyChangeListener)'
+ */
+ public void testSetEclipseLinkPropertyChangeListener() throws Exception {
+ indirectEMap.setEclipseLinkPropertyChangeListener(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.setValueHolder(ValueHolderInterface)'
+ */
+ public void testSetValueHolder() throws Exception {
+ indirectEMap.setValueHolder(null);
+ assertDelegateNotInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.toString()'
+ */
+ public void testToString() throws Exception {
+ indirectEMap.toString();
+ // ValueHolder class (not QueryBasedValueHolder and other
+ // value holders that lazily load objects) always say
+ // they are instantiated which will result in the instantiation
+ // of an empty List in the ValueHolder
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.iterator()'
+ */
+ public void testIterator() throws Exception {
+ indirectEMap.iterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.values()'
+ */
+ public void testValues() throws Exception {
+ indirectEMap.values();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.add(int, Object)'
+ */
+ public void testAddIntObject() throws Exception {
+ try {
+ indirectEMap.add(0, null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.add(Object)'
+ */
+ public void testAddObject() throws Exception {
+ try {
+ indirectEMap.add(null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.addAll(Collection)'
+ */
+ public void testAddAllCollection() throws Exception {
+ try {
+ indirectEMap.addAll(null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.addAll(int, Collection)'
+ */
+ public void testAddAllIntCollection() throws Exception {
+ try {
+ indirectEMap.addAll(0, null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.containsAll(Collection)'
+ */
+ public void testContainsAllCollection() throws Exception {
+ try {
+ indirectEMap.containsAll(null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.get(int)'
+ */
+ public void testGetInt() throws Exception {
+ try {
+ indirectEMap.get(0);
+ } catch (IndexOutOfBoundsException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.indexOf(Object)'
+ */
+ public void testIndexOfObject() throws Exception {
+ indirectEMap.indexOf(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.indexOfKey(Object)'
+ */
+ public void testIndexOfKeyObject() throws Exception {
+ indirectEMap.indexOfKey(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.lastIndexOf(Object)'
+ */
+ public void testLastIndexOfObject() throws Exception {
+ indirectEMap.lastIndexOf(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.listIterator()'
+ */
+ public void testListIterator() throws Exception {
+ indirectEMap.listIterator();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.map()'
+ */
+ public void testMap() throws Exception {
+ indirectEMap.map();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.move(int, int)'
+ */
+ public void testMoveIntInt() throws Exception {
+ try {
+ indirectEMap.move(0,1);
+ } catch (IndexOutOfBoundsException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.move(int, Object)'
+ */
+ public void testMoveIntObject() throws Exception {
+ try {
+ indirectEMap.move(0, null);
+ } catch (IndexOutOfBoundsException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.putAll(EMap)'
+ */
+ public void testPutAllEMap() throws Exception {
+ try {
+ indirectEMap.putAll((EMap<?, ?>)null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.retainAll(Collection)'
+ */
+ public void testRetainAllCollection() throws Exception {
+ indirectEMap.retainAll(null);
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.set(int, Object)'
+ */
+ public void testSetIntObject() throws Exception {
+ try {
+ indirectEMap.set(0,null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.subList(int, int)'
+ */
+ public void testSubListIntInt() throws Exception {
+ try {
+ indirectEMap.subList(0,1);
+ } catch (IndexOutOfBoundsException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.toArray()'
+ */
+ public void testToArray() throws Exception {
+ indirectEMap.toArray();
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.teneo.eclipselink.emap.EmfIndirectEMap.toArray(Object[])'
+ */
+ public void testToArrayObjectArray() throws Exception {
+ try {
+ indirectEMap.toArray(null);
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ assertDelegateInstantiated();
+ }
+
+ /*
+ * ListTest method for 'org.eclipse.emf.common.util.BasicEMap.listIterator(int)'
+ */
+ public void testListIteratorInt() throws Exception {
+ indirectEMap.listIterator(0);
+ assertDelegateInstantiated();
+ }
+}
diff --git a/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/tests/AllTests.java b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/tests/AllTests.java
new file mode 100644
index 000000000..7e601a6de
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.eclipselink.tests/src/org/eclipse/emf/teneo/eclipselink/tests/AllTests.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle and Geensys.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle and Geensys - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.teneo.eclipselink.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("org.eclipse.emf.teneo.eclipselink.tests");
+ // TODO: enable EMap support
+ //suite.addTest(org.eclipse.emf.teneo.eclipselink.emap.tests.AllTests.suite());
+ //$JUnit-BEGIN$
+ suite.addTest(org.eclipse.emf.teneo.eclipselink.elist.tests.AllTests.suite());
+ //$JUnit-END$
+ return suite;
+ }
+
+}

Back to the top