Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-03-30 15:38:45 +0000
committermtaal2007-03-30 15:38:45 +0000
commit83c2239d22a088d94a076934e8b85b285457ab5a (patch)
tree47ddd1828c744d5cbe21ca76d1f2ccec89a62250
parent52be307ec1c2ad8364c9ad29932f92833a9d4a1a (diff)
downloadorg.eclipse.emf.teneo-83c2239d22a088d94a076934e8b85b285457ab5a.tar.gz
org.eclipse.emf.teneo-83c2239d22a088d94a076934e8b85b285457ab5a.tar.xz
org.eclipse.emf.teneo-83c2239d22a088d94a076934e8b85b285457ab5a.zip
Solved multiple inheritance bug
-rw-r--r--tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/issues/MultipleInheritanceAction.java30
1 files changed, 28 insertions, 2 deletions
diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/issues/MultipleInheritanceAction.java b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/issues/MultipleInheritanceAction.java
index b3ee7f553..a462e7f61 100644
--- a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/issues/MultipleInheritanceAction.java
+++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/issues/MultipleInheritanceAction.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: MultipleInheritanceAction.java,v 1.1.2.5 2007/03/24 11:55:37 mtaal Exp $
+ * $Id: MultipleInheritanceAction.java,v 1.1.2.6 2007/03/30 15:38:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.test.issues;
@@ -27,6 +27,8 @@ import org.eclipse.emf.teneo.test.stores.TestStore;
import testinheritance.Child;
import testinheritance.Child2;
import testinheritance.NameValuePair;
+import testinheritance.ParentOne;
+import testinheritance.SomeReference;
import testinheritance.SomeResource;
import testinheritance.TestinheritanceFactory;
import testinheritance.TestinheritancePackage;
@@ -35,7 +37,7 @@ import testinheritance.TestinheritancePackage;
* Tests multiple inheritance.
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.1.2.5 $
+ * @version $Revision: 1.1.2.6 $
*/
public class MultipleInheritanceAction extends AbstractTestAction {
/**
@@ -99,6 +101,9 @@ public class MultipleInheritanceAction extends AbstractTestAction {
{
store.beginTransaction();
final Child child = TestinheritanceFactory.eINSTANCE.createChild();
+ final SomeReference sr = TestinheritanceFactory.eINSTANCE.createSomeReference();
+ sr.setName("sr1");
+ child.setSomeReference(sr);
child.setAge(10);
child.setName("myName");
child.setTestId(4); // this is the key!
@@ -107,6 +112,9 @@ public class MultipleInheritanceAction extends AbstractTestAction {
try {
store.beginTransaction();
final Child child = TestinheritanceFactory.eINSTANCE.createChild();
+ final SomeReference sr = TestinheritanceFactory.eINSTANCE.createSomeReference();
+ sr.setName("sr2");
+ child.setSomeReference(sr);
child.setAge(11);
child.setName("myName2");
child.setTestId(4); // this is the key!
@@ -121,6 +129,10 @@ public class MultipleInheritanceAction extends AbstractTestAction {
{
store.beginTransaction();
final Child2 child = TestinheritanceFactory.eINSTANCE.createChild2();
+ final SomeReference sr = TestinheritanceFactory.eINSTANCE.createSomeReference();
+ sr.setName("sr2");
+ store.store(sr);
+ child.setSomeReference(sr);
child.setAge(10);
child.setAnotherProperty(40);
child.setName("myName");
@@ -128,9 +140,23 @@ public class MultipleInheritanceAction extends AbstractTestAction {
store.store(child);
store.commitTransaction();
}
+
+ // this fails if the efeatures of the subtype have not been forced to null.
+ {
+ store.beginTransaction();
+ ParentOne po = TestinheritanceFactory.eINSTANCE.createParentOne();
+ po.setAnotherProperty(5);
+ store.store(po);
+ store.commitTransaction();
+ }
+
{
store.beginTransaction();
final Child2 child = TestinheritanceFactory.eINSTANCE.createChild2();
+ final SomeReference sr = TestinheritanceFactory.eINSTANCE.createSomeReference();
+ sr.setName("sr3");
+ store.store(sr);
+ child.setSomeReference(sr);
child.setAge(11);
child.setAnotherProperty(41);
child.setName("myName2");

Back to the top