Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-07 10:07:58 +0000
committerCamille Letavernier2014-02-07 10:07:58 +0000
commit25d1978314cda6257c58358916dc6b1f42d20172 (patch)
tree8424f1f54c7c57721ce1996b3fdd6af8add77307 /tests
parentade9d574e165b8b0dcd4dc717b68eb7a39bb3ceb (diff)
downloadorg.eclipse.papyrus-25d1978314cda6257c58358916dc6b1f42d20172.tar.gz
org.eclipse.papyrus-25d1978314cda6257c58358916dc6b1f42d20172.tar.xz
org.eclipse.papyrus-25d1978314cda6257c58358916dc6b1f42d20172.zip
417396: [CSS] The CSS Engine shall support label visibility & mask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Update tests
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java12
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
index eb1de64a68e..7e6458447b4 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
@@ -23,7 +23,7 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.gmfdiag.css.tests"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
index c311a50ca4e..96f7c5198cb 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
@@ -20,7 +20,9 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.gmf.runtime.notation.BasicCompartment;
import org.eclipse.gmf.runtime.notation.Diagram;
@@ -43,9 +45,9 @@ import org.junit.Test;
/**
* Test case for Compartment-related styles and properties
* See resources/model/compartmentsTest/model.di for details
- *
- * @author Camille Letavernier
*
+ * @author Camille Letavernier
+ *
*/
public class CSSCompartmentsTests {
@@ -147,15 +149,17 @@ public class CSSCompartmentsTests {
//Check all compartments
for(View childNode : (List<View>)class3.getChildren()) {
if(childNode instanceof BasicCompartment) {
- Assert.assertFalse("All compartments from Class3 should be hidden", childNode.isVisible());
+ Assert.assertFalse("All compartments from Class3 should be hidden. " + childNode.getType() + " is visible", childNode.isVisible());
}
}
//We need an editingDomain for the ResetStyle operation
- new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet());
+ TransactionalEditingDomain domain = new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet());
+ diagram.eResource().getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(domain));
//Test resetStyle
ResetStyleHelper.resetStyle(Collections.singleton(class3));
+
//Check only some specific compartments. Some style rules still hide the nestedClassifier compartment. The visibility of e.g. the ShapeCompartment is undetermined.
BasicCompartment attributesCompartment = findCompartment(class3, CLASS_ATTRIBUTE_COMPARTMENT_TYPE);
BasicCompartment operationsCompartment = findCompartment(class3, CLASS_OPERATION_COMPARTMENT_TYPE);

Back to the top