From 906d0cc7d2eb527b375c26c3654d3e030c482cc3 Mon Sep 17 00:00:00 2001 From: Laurent Delaigue Date: Fri, 18 Sep 2015 16:12:49 +0200 Subject: Remove dependency to rcp in emf.compare.tests Introduce new test project to do so. Change-Id: I6d487446bd7b78110ab6b742c57496d56d81ca14 Signed-off-by: Laurent Delaigue --- .../eclipse/emf/compare/tests/rcp/AllRCPTests.java | 24 -- .../emf/compare/tests/rcp/ItemRegistryTest.java | 176 --------- .../rcp/MatchEngineFactoryRegistryWrapperTest.java | 399 --------------------- .../emf/compare/tests/rcp/data/EcoreInputData.java | 33 -- .../compare/tests/rcp/data/extlibraryLeft.ecore | 109 ------ .../compare/tests/rcp/data/extlibraryOrigin.ecore | 111 ------ .../compare/tests/rcp/data/extlibraryRight.ecore | 112 ------ .../eclipse/emf/compare/tests/suite/AllTests.java | 5 +- 8 files changed, 2 insertions(+), 967 deletions(-) delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/AllRCPTests.java delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/ItemRegistryTest.java delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/MatchEngineFactoryRegistryWrapperTest.java delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/EcoreInputData.java delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryLeft.ecore delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryOrigin.ecore delete mode 100644 plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryRight.ecore (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf') diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/AllRCPTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/AllRCPTests.java deleted file mode 100644 index 320e9d5c5..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/AllRCPTests.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.emf.compare.tests.rcp; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * @author Arthur Daussy - */ -@RunWith(Suite.class) -@SuiteClasses({ItemRegistryTest.class, MatchEngineFactoryRegistryWrapperTest.class }) -public class AllRCPTests { - -} diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/ItemRegistryTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/ItemRegistryTest.java deleted file mode 100644 index 6ea934c2a..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/ItemRegistryTest.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.emf.compare.tests.rcp; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - -import org.eclipse.emf.compare.match.IMatchEngine; -import org.eclipse.emf.compare.match.IMatchEngine.Factory; -import org.eclipse.emf.compare.match.impl.MatchEngineFactoryImpl; -import org.eclipse.emf.compare.rcp.internal.extension.IItemDescriptor; -import org.eclipse.emf.compare.rcp.internal.extension.IItemRegistry; -import org.eclipse.emf.compare.rcp.internal.extension.impl.ItemRegistry; -import org.eclipse.emf.compare.rcp.internal.extension.impl.WrapperItemDescriptor; -import org.junit.Before; -import org.junit.Test; - -/** - * Test class for {@link ItemRegistry}. - * - * @author Arthur Daussy - */ -@SuppressWarnings({"restriction", "nls" }) -public class ItemRegistryTest { - - /** Registry to test. */ - private IItemRegistry registry; - - @Before - public void setUp() { - registry = new ItemRegistry(); - } - - /** - * Create a {@link IMatchEngine.Factory} descriptor. - * - * @param id - * Id of the descriptor. - * @param rank - * Rank of the descriptor. - * @param instance - * Instance that the descriptor describes. - * @return {@link IItemDescriptor} of {@link IMatchEngine.Factory}. - */ - private IItemDescriptor createDescriptor(String id, int rank, - IMatchEngine.Factory instance) { - return new WrapperItemDescriptor("Fake label " + id, "Fake description " + id, - rank, id, instance); - } - - /** - * Nominal use case: Add an element in the registry. - */ - @Test - public void testAdd() { - String id = "fakeID"; - IItemDescriptor instance = createDescriptor(id, 1, new MatchEngineFactoryImpl()); - IItemDescriptor oldValue = registry.add(instance); - assertEquals(registry.getItemDescriptors().size(), 1); - assertSame(registry.getItemDescriptor(id), instance); - assertSame(registry.getHighestRankingDescriptor(), instance); - assertNull(oldValue); - } - - /** - * Adds a null to the registry. - */ - @Test(expected = NullPointerException.class) - public void testAddNull() { - registry.add(null); - } - - /** - * Adds two elements with the same id in the registry. - */ - @Test - public void testSameID() { - String id = "fakeID"; - IItemDescriptor instance1 = createDescriptor(id, 1, new MatchEngineFactoryImpl()); - registry.add(instance1); - IItemDescriptor instance2 = createDescriptor(id, 2, new MatchEngineFactoryImpl()); - IItemDescriptor oldValue = registry.add(instance2); - assertTrue(oldValue == instance1); - assertTrue(registry.getItemDescriptor(id) == instance2); - assertTrue(registry.getItemDescriptors().size() == 1); - } - - /** - * Nominal use case: Checks that the registry returns the item with the highest rank. - */ - @Test - public void testGetHighestRankingItem() { - registry.add(createDescriptor("Id-10", -10, new MatchEngineFactoryImpl())); - registry.add(createDescriptor("Id0", 0, new MatchEngineFactoryImpl())); - registry.add(createDescriptor("Id10", 10, new MatchEngineFactoryImpl())); - IItemDescriptor higherRankedInstance = createDescriptor("Id100", 100, - new MatchEngineFactoryImpl()); - registry.add(higherRankedInstance); - assertTrue(registry.getHighestRankingDescriptor() == higherRankedInstance); - } - - /** - * Gets the highest ranking item from an empty registry. - */ - @Test - public void testGetHighestRankingItemEmptyRegistry() { - assertTrue(registry.getHighestRankingDescriptor() == null); - } - - /** - * Checks that the registry handles correctly items with equal rank. - */ - @Test - public void testHighestRankingItemEqualRank() { - IItemDescriptor instance1 = createDescriptor("Id1", 10, new MatchEngineFactoryImpl()); - registry.add(instance1); - IItemDescriptor instance2 = createDescriptor("Id2", 10, new MatchEngineFactoryImpl()); - registry.add(instance2); - IItemDescriptor highestRankedElement = registry.getHighestRankingDescriptor(); - assertTrue(highestRankedElement == instance2 || highestRankedElement == instance1); - } - - /** - * Nominal use case: Remove an item from the registry. - */ - @Test - public void testRemove() { - String id = "fakeID"; - IItemDescriptor instance = createDescriptor(id, 1, new MatchEngineFactoryImpl()); - registry.add(instance); - IItemDescriptor oldValue = registry.remove(id); - - assertTrue(oldValue == instance); - assertTrue(registry.getItemDescriptors().isEmpty()); - } - - /** - * Tries to remove null from the registry. - */ - @Test(expected = NullPointerException.class) - public void testRemoveNull() { - registry.remove(null); - } - - /** - * Tries to remove an element with an id that is not in the registry. - */ - @Test - public void testRemoveWrongElementId() { - String id = "fakeID"; - IItemDescriptor oldValue = registry.remove(id); - assertTrue(oldValue == null); - } - - /** - * Nominal use case: Clear the registry. - */ - @Test - public void testClearRegistry() { - registry.add(createDescriptor("Id-10", -10, new MatchEngineFactoryImpl())); - registry.add(createDescriptor("Id0", 0, new MatchEngineFactoryImpl())); - registry.add(createDescriptor("Id10", 10, new MatchEngineFactoryImpl())); - registry.clear(); - assertTrue(registry.getItemDescriptors().isEmpty()); - } -} diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/MatchEngineFactoryRegistryWrapperTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/MatchEngineFactoryRegistryWrapperTest.java deleted file mode 100644 index cb356f409..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/MatchEngineFactoryRegistryWrapperTest.java +++ /dev/null @@ -1,399 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2015 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.emf.compare.tests.rcp; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - -import com.google.common.base.Joiner; -import com.google.common.collect.Lists; - -import java.io.IOException; -import java.util.Collection; -import java.util.Collections; - -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.emf.compare.EMFCompare; -import org.eclipse.emf.compare.match.IMatchEngine; -import org.eclipse.emf.compare.match.IMatchEngine.Factory; -import org.eclipse.emf.compare.match.impl.MatchEngineFactoryImpl; -import org.eclipse.emf.compare.rcp.internal.extension.IItemDescriptor; -import org.eclipse.emf.compare.rcp.internal.extension.impl.ItemRegistry; -import org.eclipse.emf.compare.rcp.internal.extension.impl.ItemUtil; -import org.eclipse.emf.compare.rcp.internal.match.MatchEngineFactoryRegistryWrapper; -import org.eclipse.emf.compare.rcp.internal.preferences.EMFComparePreferences; -import org.eclipse.emf.compare.scope.DefaultComparisonScope; -import org.eclipse.emf.compare.scope.IComparisonScope; -import org.eclipse.emf.compare.tests.rcp.data.EcoreInputData; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.osgi.service.prefs.BackingStoreException; - -/** - * Test class for {@link MatchEngineFactoryRegistryWrapper}. - * - * @author Arthur Daussy - */ -@SuppressWarnings({"restriction", "nls" }) -public class MatchEngineFactoryRegistryWrapperTest { - - private MatchEngineFactoryRegistryWrapper registryWrapper; - - private IEclipsePreferences preferences; - - /** - * Creates a comparison scope from Ecore model. - * - * @return {@link IComparisonScope} - * @throws IOException - */ - private IComparisonScope createComparisonScope() throws IOException { - EcoreInputData ecoreData = new EcoreInputData(); - return new DefaultComparisonScope(ecoreData.getLeft(), ecoreData.getRight(), ecoreData.getOrigin()); - } - - // For Helios compatibility. - @SuppressWarnings("deprecation") - @Before - public void setUp() throws BackingStoreException { - ItemRegistry registry = new ItemRegistry(); - // Mock preference node. - preferences = new InstanceScope() - .getNode("org.eclipse.emf.compare.tests.rcp.MatchEngineFactoryRegistryWrapperTest"); - preferences.clear(); - registryWrapper = new MatchEngineFactoryRegistryWrapper(registry, preferences); - } - - @After - public void tearDown() throws BackingStoreException { - preferences.clear(); - } - - /** - * Nominal use case: Adds {@link IMatchEngine.Factory} in the registry. - * - * @throws IOException - */ - @Test - public void testAdd() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - IComparisonScope createComparisonScope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(createComparisonScope), factory); - assertEquals(registryWrapper.getMatchEngineFactories(createComparisonScope).size(), 1); - } - - /** - * Adds a factory with no ranking set into the registry. - * - * @throws IOException - */ - @Test - public void testAddFactoryWithNoRanking() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - registryWrapper.add(factory); - IMatchEngine.Factory factory2 = new MockMatchEngineFactory2(); - factory2.setRanking(10); - registryWrapper.add(factory2); - IComparisonScope createComparisonScope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(createComparisonScope), factory2); - } - - /** - * Adds null to the registry. - */ - @Test(expected = NullPointerException.class) - public void testAddNull() { - registryWrapper.add(null); - } - - /** - * Adds two factories with identical id in the registry. - * - * @throws IOException - */ - @Test - public void testAddSameID() throws IOException { - MockMatchEngineFactory1 factory1 = new MockMatchEngineFactory1(); - factory1.setRanking(10); - registryWrapper.add(factory1); - MockMatchEngineFactory1 factory2 = new MockMatchEngineFactory1(); - Factory oldValue = registryWrapper.add(factory2); - assertTrue(oldValue == factory1); - IComparisonScope createComparisonScope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(createComparisonScope), factory2); - } - - /** - * Nominal use case: Gets the highest ranking match engine factory. - * - * @throws IOException - */ - @Test - public void testHighestRankingMatchEngineFactory() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - IMatchEngine.Factory factory2 = new MockMatchEngineFactory2(); - factory2.setRanking(20); - registryWrapper.add(factory2); - IMatchEngine.Factory factory3 = new MockMatchEngineFactory3(); - factory3.setRanking(30); - registryWrapper.add(factory3); - - IComparisonScope scope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(scope), factory3); - assertTrue(registryWrapper.getMatchEngineFactories(scope).containsAll( - Lists.newArrayList(factory, factory2, factory3))); - } - - /** - * Tries to get the highest ranking match engine factory from an empty registry. - * - * @throws IOException - */ - @Test - public void testHighestRankingMatchEngineFactoryEmpty() throws IOException { - IComparisonScope scope = createComparisonScope(); - assertEquals(registryWrapper.getHighestRankingMatchEngineFactory(scope), null); - assertTrue(registryWrapper.getMatchEngineFactories(scope).isEmpty()); - } - - /** - * Nominal use case: Gets the highest ranking match engine factory with more complex registry. - * - * @throws IOException - */ - @Test - public void testHighestRankingMatchEngineFactoryWithDisabledFactories() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - - IMatchEngine.Factory factory2 = new MockMatchEngineFactory2(); - factory2.setRanking(20); - registryWrapper.add(factory2); - - IMatchEngine.Factory factory3 = new MockMatchEngineFactory3(); - factory3.setRanking(30); - registryWrapper.add(factory3); - - IMatchEngine.Factory disabledFactory1 = new MockDisabledMatchEngineFactory1(); - disabledFactory1.setRanking(40); - registryWrapper.add(disabledFactory1); - - IMatchEngine.Factory disabledFactory2 = new MockDisabledMatchEngineFactory2(); - disabledFactory2.setRanking(50); - registryWrapper.add(disabledFactory2); - - IMatchEngine.Factory disabledFactory3 = new MockDisabledMatchEngineFactory3(); - disabledFactory2.setRanking(60); - registryWrapper.add(disabledFactory3); - - IComparisonScope scope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(scope), factory3); - assertTrue(registryWrapper.getMatchEngineFactories(scope).containsAll( - Lists.newArrayList(factory, factory2, factory3))); - - } - - /** - * Nominal use case: Removes a factory from the registry. - * - * @throws IOException - */ - @Test - public void testRemove() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - - Factory oldValue = registryWrapper.remove(MockMatchEngineFactory1.class.getName()); - assertSame(oldValue, factory); - assertTrue(registryWrapper.getMatchEngineFactories(createComparisonScope()).isEmpty()); - } - - /** - * Tries to remove null from the registry. - */ - @Test(expected = NullPointerException.class) - public void testRemoveNull() { - registryWrapper.remove(null); - } - - /** - * Tries to remove a factory from the registry with an incoherent id. - * - * @throws IOException - */ - @Test - public void testRemoveWrongID() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - - Factory oldValue = registryWrapper.remove("IncohereId"); - assertNull(oldValue); - assertTrue(!registryWrapper.getMatchEngineFactories(createComparisonScope()).isEmpty()); - } - - /** - * Nominal use case: Disables Match Engine factory from preferences. Checks that the registry to do use - * them anymore. - * - * @throws IOException - */ - @Test - public void testDisablingMatchEngine() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - - IMatchEngine.Factory factory2 = new MockMatchEngineFactory2(); - factory2.setRanking(20); - registryWrapper.add(factory2); - - IMatchEngine.Factory factory3 = new MockMatchEngineFactory3(); - factory3.setRanking(30); - registryWrapper.add(factory3); - - IComparisonScope scope = createComparisonScope(); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(scope), factory3); - - disableEngine(preferences, EMFComparePreferences.MATCH_ENGINE_DISABLE_ENGINES, Collections - .singleton(factory3.getClass().getName())); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(scope), factory2); - assertTrue(!registryWrapper.getMatchEngineFactories(scope).contains(factory3)); - - disableEngine(preferences, EMFComparePreferences.MATCH_ENGINE_DISABLE_ENGINES, Lists.newArrayList( - factory3.getClass().getName(), factory2.getClass().getName())); - assertSame(registryWrapper.getHighestRankingMatchEngineFactory(scope), factory); - assertTrue(!registryWrapper.getMatchEngineFactories(scope).contains(factory2)); - - } - - @Test - public void testEMFCompareBuilder() throws IOException { - IMatchEngine.Factory factory = new MockMatchEngineFactory1(); - factory.setRanking(10); - registryWrapper.add(factory); - - IMatchEngine.Factory factory2 = new MockMatchEngineFactory2(); - factory2.setRanking(20); - registryWrapper.add(factory2); - - IMatchEngine.Factory factory3 = new MockMatchEngineFactory3(); - factory3.setRanking(30); - registryWrapper.add(factory3); - - MockBuilder mockBuilder = new MockBuilder(); - mockBuilder.build(); - - IMatchEngine.Factory.Registry builderMatchEngineFactoryRegistry = mockBuilder - .getMatchEngineFactoryRegistry(); - - assertNotSame(registryWrapper, builderMatchEngineFactoryRegistry); - - mockBuilder.setMatchEngineFactoryRegistry(registryWrapper); - mockBuilder.build(); - builderMatchEngineFactoryRegistry = mockBuilder.getMatchEngineFactoryRegistry(); - - assertSame(registryWrapper, builderMatchEngineFactoryRegistry); - - } - - /** - * Disables engine in preferences. - * - * @param preference - * {@link IEclipsePreferences} - * @param key - * @param toDisable - * {@link Collection} of {@link IItemDescriptor} to disable. - */ - private void disableEngine(IEclipsePreferences preference, String key, Collection toDisable) { - if (toDisable != null && !toDisable.isEmpty()) { - String newPreferenceValue = Joiner.on(ItemUtil.PREFERENCE_DELIMITER).join(toDisable); - preference.put(key, newPreferenceValue); - } else { - preference.remove(key); - } - } - - /** - * Mock {@link IMatchEngine.Factory} that does not handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockDisabledMatchEngineFactory1 extends MatchEngineFactoryImpl { - @Override - public boolean isMatchEngineFactoryFor(IComparisonScope scope) { - return false; - } - } - - /** - * Mock {@link IMatchEngine.Factory} that does not handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockDisabledMatchEngineFactory2 extends MockDisabledMatchEngineFactory1 { - } - - /** - * Mock {@link IMatchEngine.Factory} that does not handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockDisabledMatchEngineFactory3 extends MockDisabledMatchEngineFactory1 { - } - - /** - * Mock {@link IMatchEngine.Factory} that can handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockMatchEngineFactory1 extends MatchEngineFactoryImpl { - } - - /** - * Mock {@link IMatchEngine.Factory} that can handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockMatchEngineFactory2 extends MatchEngineFactoryImpl { - } - - /** - * Mock {@link IMatchEngine.Factory} that can handle any {@link IComparisonScope}. - * - * @author Arthur Daussy - */ - private static class MockMatchEngineFactory3 extends MatchEngineFactoryImpl { - } - - /** - * Mock {@link EMFCompare.Builder} in order to access matchEngineFactoryRegistry field. - * - * @author Axel Richard - */ - private static class MockBuilder extends EMFCompare.Builder { - public IMatchEngine.Factory.Registry getMatchEngineFactoryRegistry() { - return this.matchEngineFactoryRegistry; - } - } -} diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/EcoreInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/EcoreInputData.java deleted file mode 100644 index 30e6c2431..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/EcoreInputData.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Obeo. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.emf.compare.tests.rcp.data; - -import java.io.IOException; - -import org.eclipse.emf.compare.tests.edit.data.ResourceScopeProvider; -import org.eclipse.emf.compare.tests.framework.AbstractInputData; -import org.eclipse.emf.ecore.resource.Resource; - -@SuppressWarnings("nls") -public class EcoreInputData extends AbstractInputData implements ResourceScopeProvider { - - public Resource getLeft() throws IOException { - return loadFromClassLoader("extlibraryLeft.ecore"); - } - - public Resource getRight() throws IOException { - return loadFromClassLoader("extlibraryRight.ecore"); - } - - public Resource getOrigin() throws IOException { - return loadFromClassLoader("extlibraryOrigin.ecore"); - } -} diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryLeft.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryLeft.ecore deleted file mode 100644 index b26cef279..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryLeft.ecore +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryOrigin.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryOrigin.ecore deleted file mode 100644 index c891aa81b..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryOrigin.ecore +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryRight.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryRight.ecore deleted file mode 100644 index 09d5b0720..000000000 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/rcp/data/extlibraryRight.ecore +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java index 98df55f9e..af90f241b 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java @@ -59,7 +59,6 @@ import org.eclipse.emf.compare.tests.monitor.MonitorCancelTest; import org.eclipse.emf.compare.tests.nodes.NodesPackage; import org.eclipse.emf.compare.tests.nodes.util.NodesResourceFactoryImpl; import org.eclipse.emf.compare.tests.postprocess.PostProcessorTest; -import org.eclipse.emf.compare.tests.rcp.AllRCPTests; import org.eclipse.emf.compare.tests.req.ReqComputingTest; import org.eclipse.emf.compare.tests.scope.DefaultComparisonScopeTest; import org.eclipse.emf.compare.tests.utils.EqualityHelperTest; @@ -85,8 +84,8 @@ import org.junit.runners.Suite.SuiteClasses; DynamicInstanceComparisonTest.class, URIDistanceTest.class, FragmentationTest.class, AllEditTests.class, CommandStackTestSuite.class, MatchEngineFactoryRegistryTest.class, RootIDMatchingTest.class, XMIMatchingTest.class, ProxyMatchingTest.class, ConflictMergeTest.class, - PseudoConflictMergeTest.class, ProximityIndexTest.class, AllRCPTests.class, - FeatureMaps2wayMergeTest.class, FeatureMaps3wayMergeTest.class, FeatureMapsConflictsMergeTest.class, + PseudoConflictMergeTest.class, ProximityIndexTest.class, FeatureMaps2wayMergeTest.class, + FeatureMaps3wayMergeTest.class, FeatureMapsConflictsMergeTest.class, FeatureMapsPseudoConflictsMergeTest.class, TwoWayBatchMergingTest.class, EqualityHelperTest.class, FeatureFilterTest.class, ThreeWayBatchMergingTest.class, MultiLineAttributeConflictDetectionTest.class, ThreeWayTextDiffTest.class, -- cgit v1.2.3