diff options
author | mtaal | 2006-12-20 09:41:02 +0000 |
---|---|---|
committer | mtaal | 2006-12-20 09:41:02 +0000 |
commit | 0123b55ccbbf2b291a2c90054996f41099cad579 (patch) | |
tree | 47cf3991e62a803c028f5caac8f32c34b2e805a7 | |
parent | 76cd3b0bffb250b35ef5c907029bc078b9a7d2cd (diff) | |
download | org.eclipse.emf.teneo-0123b55ccbbf2b291a2c90054996f41099cad579.tar.gz org.eclipse.emf.teneo-0123b55ccbbf2b291a2c90054996f41099cad579.tar.xz org.eclipse.emf.teneo-0123b55ccbbf2b291a2c90054996f41099cad579.zip |
Changed arraylist to hashset in StoreResource modifed, new and removedobjects lists.build_200612210758
3 files changed, 30 insertions, 12 deletions
diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/annotations/LazyLibraryAction.java b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/annotations/LazyLibraryAction.java index 66618ac15..1c67a5ab4 100644 --- a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/annotations/LazyLibraryAction.java +++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/annotations/LazyLibraryAction.java @@ -11,7 +11,7 @@ * Martin Taal * </copyright> * - * $Id: LazyLibraryAction.java,v 1.5 2006/09/29 12:30:28 mtaal Exp $ + * $Id: LazyLibraryAction.java,v 1.6 2006/12/20 09:41:02 mtaal Exp $ */ package org.eclipse.emf.teneo.test.emf.annotations; @@ -41,7 +41,7 @@ import org.eclipse.emf.teneo.test.stores.TestStore; * does not result in loaded containment elists. * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ */ public class LazyLibraryAction extends AbstractTestAction { @@ -187,8 +187,14 @@ public class LazyLibraryAction extends AbstractTestAction assertEquals(2, libraryAdapter.getCountNotifications()); EObject[] modifieds = ((StoreResource)res).getModifiedEObjects(); - assertTrue("Library should be the first modified object", modifieds[0] == lib); - assertTrue("Book should be the second modified object", modifieds[1] == book); + boolean fndLibrary = false; + boolean fndBook = false; + for (int i = 0; i < modifieds.length; i++) { + fndLibrary = fndLibrary || modifieds[i] == lib; + fndBook = fndBook || modifieds[i] == book; + } + assertTrue("Library should be a modified object", fndLibrary); + assertTrue("Book should be a modified object", fndBook); assertEquals(2, modifieds.length); res.unload(); } diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryGlobalEagerAction.java b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryGlobalEagerAction.java index b6698588d..da42c9bcd 100644 --- a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryGlobalEagerAction.java +++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryGlobalEagerAction.java @@ -11,7 +11,7 @@ * Martin Taal * </copyright> * - * $Id: LibraryGlobalEagerAction.java,v 1.3 2006/09/21 00:57:18 mtaal Exp $ + * $Id: LibraryGlobalEagerAction.java,v 1.4 2006/12/20 09:41:02 mtaal Exp $ */ package org.eclipse.emf.teneo.test.emf.sample; @@ -40,7 +40,7 @@ import org.eclipse.emf.teneo.test.stores.TestStore; * Tests setting of eager loading of containment at global level * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class LibraryGlobalEagerAction extends AbstractTestAction { @@ -192,8 +192,14 @@ public class LibraryGlobalEagerAction extends AbstractTestAction assertEquals(2, libraryAdapter.getCountNotifications()); EObject[] modifieds = ((StoreResource)res).getModifiedEObjects(); - assertTrue("Library should be the first modified object", modifieds[0] == lib); - assertTrue("Book should be the second modified object", modifieds[1] == book); + boolean fndLibrary = false; + boolean fndBook = false; + for (int i = 0; i < modifieds.length; i++) { + fndLibrary = fndLibrary || modifieds[i] == lib; + fndBook = fndBook || modifieds[i] == book; + } + assertTrue("Library should be a modified object", fndLibrary); + assertTrue("Book should be a modified object", fndBook); assertEquals(2, modifieds.length); res.unload(); } diff --git a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryNonResolvingAction.java b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryNonResolvingAction.java index 8a8c83b23..6ea5574c8 100644 --- a/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryNonResolvingAction.java +++ b/tests/org.eclipse.emf.teneo.commontest/src/org/eclipse/emf/teneo/test/emf/sample/LibraryNonResolvingAction.java @@ -11,7 +11,7 @@ * Martin Taal * </copyright> * - * $Id: LibraryNonResolvingAction.java,v 1.4 2006/11/13 19:55:37 mtaal Exp $ + * $Id: LibraryNonResolvingAction.java,v 1.5 2006/12/20 09:41:02 mtaal Exp $ */ package org.eclipse.emf.teneo.test.emf.sample; @@ -40,7 +40,7 @@ import org.eclipse.emf.teneo.test.stores.TestStore; * does not result in loaded containment elists. * * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public class LibraryNonResolvingAction extends AbstractTestAction { @@ -185,8 +185,14 @@ public class LibraryNonResolvingAction extends AbstractTestAction assertEquals(2, libraryAdapter.getCountNotifications()); EObject[] modifieds = ((StoreResource)res).getModifiedEObjects(); - assertTrue("Library should be the first modified object", modifieds[0] == lib); - assertTrue("Book should be the second modified object", modifieds[1] == book); + boolean fndLibrary = false; + boolean fndBook = false; + for (int i = 0; i < modifieds.length; i++) { + fndLibrary = fndLibrary || modifieds[i] == lib; + fndBook = fndBook || modifieds[i] == book; + } + assertTrue("Library should be a modified object", fndLibrary); + assertTrue("Book should be a modified object", fndBook); assertEquals(2, modifieds.length); res.unload(); |