Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Lorenzo2018-11-27 09:51:09 +0000
committervincent lorenzo2018-11-29 09:28:48 +0000
commit5bf47e1b9c6d58b68dbed5407cf12669cceee874 (patch)
tree7fa55fd7457b37e8adb6a825435f2241a250d818 /tests
parent1fd65f398c276af8b7dc5185c04ef1e49769c5e8 (diff)
downloadorg.eclipse.papyrus-5bf47e1b9c6d58b68dbed5407cf12669cceee874.tar.gz
org.eclipse.papyrus-5bf47e1b9c6d58b68dbed5407cf12669cceee874.tar.xz
org.eclipse.papyrus-5bf47e1b9c6d58b68dbed5407cf12669cceee874.zip
Bug 541590: [Modeling Assistant] Remove the generation of the cache adapter method in the Modeling assistant framework
Change-Id: Iff17567a39b60c91cea97b82ae61c9bd8e51abe9 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java38
-rw-r--r--tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java24
2 files changed, 27 insertions, 35 deletions
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
index 1c64bb08cb6..ef51d9a5fdf 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
@@ -17,9 +17,9 @@ import static org.eclipse.papyrus.infra.gmfdiag.assistant.tests.ElementTypesUtil
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
+
import java.util.Arrays;
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
+
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -33,6 +33,9 @@ import org.eclipse.uml2.common.util.CacheAdapter;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.resource.UMLResource;
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Assisted Element Type Filter</b></em>'.
@@ -52,8 +55,7 @@ import org.eclipse.uml2.uml.resource.UMLResource;
*
* @generated
*/
-public class AssistedElementTypeFilterTest extends TestCase
-{
+public class AssistedElementTypeFilterTest extends TestCase {
/**
* The fixture for this Assisted Element Type Filter test case.
@@ -70,8 +72,7 @@ public class AssistedElementTypeFilterTest extends TestCase
*
* @generated
*/
- public static void main(String[] args)
- {
+ public static void main(String[] args) {
TestRunner.run(AssistedElementTypeFilterTest.class);
}
@@ -82,8 +83,7 @@ public class AssistedElementTypeFilterTest extends TestCase
*
* @generated
*/
- public AssistedElementTypeFilterTest(String name)
- {
+ public AssistedElementTypeFilterTest(String name) {
super(name);
}
@@ -94,8 +94,7 @@ public class AssistedElementTypeFilterTest extends TestCase
*
* @generated
*/
- protected void setFixture(AssistedElementTypeFilter fixture)
- {
+ protected void setFixture(AssistedElementTypeFilter fixture) {
this.fixture = fixture;
}
@@ -106,8 +105,7 @@ public class AssistedElementTypeFilterTest extends TestCase
*
* @generated
*/
- protected AssistedElementTypeFilter getFixture()
- {
+ protected AssistedElementTypeFilter getFixture() {
return fixture;
}
@@ -119,10 +117,9 @@ public class AssistedElementTypeFilterTest extends TestCase
* @generated NOT
*/
@Override
- protected void setUp() throws Exception
- {
+ protected void setUp() throws Exception {
ResourceSet rset = new ResourceSetImpl();
- rset.eAdapters().add(new CacheAdapter());
+ rset.eAdapters().add(new CacheAdapter()); // bug 541590 [CDO] - change is not required here
Resource res = rset.getResource(URI.createPlatformPluginURI("org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants", true), true);
setFixture((AssistedElementTypeFilter) ((ModelingAssistantProvider) res.getContents().get(0)).getOwnedFilter("isAssistedElementType"));
@@ -136,8 +133,7 @@ public class AssistedElementTypeFilterTest extends TestCase
* @generated NOT
*/
@Override
- protected void tearDown() throws Exception
- {
+ protected void tearDown() throws Exception {
EMFHelper.unload(EMFHelper.getResourceSet(getFixture()));
setFixture(null);
}
@@ -150,8 +146,7 @@ public class AssistedElementTypeFilterTest extends TestCase
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistedElementTypeFilter#getProvider()
* @generated NOT
*/
- public void testGetProvider()
- {
+ public void testGetProvider() {
ModelingAssistantProvider provider = (ModelingAssistantProvider) EcoreUtil.getRootContainer(getFixture());
assertThat(getFixture().getProvider(), is(provider));
@@ -173,8 +168,7 @@ public class AssistedElementTypeFilterTest extends TestCase
* @see org.eclipse.papyrus.infra.filters.Filter#matches(java.lang.Object)
* @generated NOT
*/
- public void testMatches__Object()
- {
+ public void testMatches__Object() {
// Match an element type
assertThat(getFixture().matches(canonicalize(UMLElementTypes.DATA_TYPE)), is(true));
assertThat(getFixture().matches(canonicalize(UMLElementTypes.ENUMERATION)), is(false)); // don't match element-type subtypes
@@ -185,7 +179,7 @@ public class AssistedElementTypeFilterTest extends TestCase
EMFHelper.getResourceSet(getFixture()).getResources().add(uml);
uml.getContents().addAll(Arrays.asList( //
UMLFactory.eINSTANCE.createDataType(), //
- UMLFactory.eINSTANCE.createEnumeration(),//
+ UMLFactory.eINSTANCE.createEnumeration(), //
UMLFactory.eINSTANCE.createCallBehaviorAction()));
// Match an object
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
index e4516c82044..6cdd8de9ecc 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
@@ -18,9 +18,9 @@ import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
+
import java.util.Collection;
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
+
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -42,6 +42,9 @@ import org.eclipse.uml2.common.util.CacheAdapter;
import org.eclipse.uml2.uml.UMLFactory;
import org.hamcrest.CoreMatchers;
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Modeling Assistant Provider</b></em>'.
@@ -145,7 +148,7 @@ public class ModelingAssistantProviderTest extends TestCase {
@Override
protected void setUp() throws Exception {
ResourceSet rset = new ResourceSetImpl();
- rset.eAdapters().add(new CacheAdapter());
+ rset.eAdapters().add(new CacheAdapter()); // bug 541590 [CDO] - change is not required here
Resource res = rset.getResource(URI.createPlatformPluginURI("org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants", true), true);
setFixture((ModelingAssistantProvider) res.getContents().get(0));
@@ -185,8 +188,7 @@ public class ModelingAssistantProviderTest extends TestCase {
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getClientContext()
* @generated NOT
*/
- public void testGetClientContext()
- {
+ public void testGetClientContext() {
assertThat(getFixture().getClientContext(), is(ElementTypeUtils.getDefaultClientContext()));
getFixture().setClientContextID("org.eclipse.papyrus.uml.diagram.clazz.TypeContext");
@@ -211,8 +213,7 @@ public class ModelingAssistantProviderTest extends TestCase {
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getExcludedElementTypes()
* @generated NOT
*/
- public void testGetExcludedElementTypes()
- {
+ public void testGetExcludedElementTypes() {
assertThat(getFixture().getExcludedElementTypes(), hasItem(canonicalize(UMLElementTypes.ASSOCIATION_CLASS)));
}
@@ -224,8 +225,7 @@ public class ModelingAssistantProviderTest extends TestCase {
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getRelationshipTypes()
* @generated NOT
*/
- public void testGetRelationshipTypes()
- {
+ public void testGetRelationshipTypes() {
assertThat(getFixture().getRelationshipTypes(), hasItem(canonicalize(UMLElementTypes.USAGE)));
assertThat(getFixture().getRelationshipTypes(), hasItem(canonicalize(UMLElementTypes.GENERALIZATION)));
assertThat(getFixture().getRelationshipTypes(), not(hasItem(canonicalize(UMLElementTypes.CLASS))));
@@ -491,8 +491,7 @@ public class ModelingAssistantProviderTest extends TestCase {
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementType(java.lang.String)
* @generated NOT
*/
- public void testGetElementType__String()
- {
+ public void testGetElementType__String() {
assertThat(canonicalize(UMLElementTypes.CLASS), is(getFixture().getElementType("org.eclipse.papyrus.uml.Class")));
}
@@ -504,8 +503,7 @@ public class ModelingAssistantProviderTest extends TestCase {
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#isRelationshipType(org.eclipse.gmf.runtime.emf.type.core.IElementType)
* @generated NOT
*/
- public void testIsRelationshipType__IElementType()
- {
+ public void testIsRelationshipType__IElementType() {
assertThat(getFixture().isRelationshipType(canonicalize(UMLElementTypes.USAGE)), is(true));
assertThat(getFixture().isRelationshipType(canonicalize(UMLElementTypes.GENERALIZATION)), is(true));
assertThat(getFixture().isRelationshipType(canonicalize(UMLElementTypes.CLASS)), is(false));

Back to the top