Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java17
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java9
2 files changed, 16 insertions, 10 deletions
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java
index 437dfd46782..e8f384d6ec3 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java
@@ -68,7 +68,10 @@ import org.junit.Test;
*/
public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
+ protected static final String ST_LEFT = String.valueOf("\u00AB");
+ protected static final String ST_RIGHT = String.valueOf("\u00BB");
+
private static final String TEST_PROFILE_STEREOTYPE1 = "testProfile::Stereotype1";
@Test
@@ -242,8 +245,8 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
//get the label
org.eclipse.draw2d.Label stereotypeLabel=((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null);
- assertTrue( "text of stereotype label be equals to «stereotype1» " ,stereotypeLabel.getText().equals("«stereotype1»"));
- }
+ assertTrue( "text of stereotype label be equals to "+ST_LEFT+"stereotype1"+ST_RIGHT ,stereotypeLabel.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
+ }
{//test about the layout
org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
@@ -269,7 +272,7 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3);
assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200);
assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15);
- assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»"));
+ assertTrue("The label of the Class does not display "+ST_LEFT+"stereotype1"+ST_RIGHT,stereotypelabelClass.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
//wrappingLabel for name
@@ -373,7 +376,7 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3);
assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200);
assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15);
- assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»"));
+ assertTrue("The label of the Class does not display "+ST_LEFT+"stereotype1"+ST_RIGHT,stereotypelabelClass.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
//wrappingLabel for name
@@ -594,7 +597,7 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
//get the label
org.eclipse.draw2d.Label stereotypeLabel=((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null);
- assertTrue( "text of stereotype label be equals to «stereotype1» " ,stereotypeLabel.getText().equals("«stereotype1»"));
+ assertTrue( "text of stereotype label be equals to "+ST_LEFT+"stereotype1"+ST_RIGHT ,stereotypeLabel.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
}
{//test about the layout
@@ -621,7 +624,7 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3);
assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200);
assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15);
- assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»"));
+ assertTrue("The label of the Class does not display "+ST_LEFT+"stereotype1"+ST_RIGHT,stereotypelabelClass.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
//wrappingLabel for name
@@ -725,7 +728,7 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3);
assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200);
assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15);
- assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»"));
+ assertTrue("The label of the Class does not display "+ST_LEFT+"stereotype1"+ST_RIGHT,stereotypelabelClass.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
//wrappingLabel for name
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
index b2f629e03de..cbe1453b00b 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
@@ -55,6 +55,9 @@ import org.junit.Test;
public class TestStereotypeApplication extends AbstractPapyrusTestCase {
+ protected static final String ST_LEFT = String.valueOf("\u00AB");
+
+ protected static final String ST_RIGHT = String.valueOf("\u00BB");
private static final String TEST_PROFILE_STEREOTYPE1 = "testProfile::Stereotype1";
@Test
@@ -157,7 +160,7 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase {
//get the label
org.eclipse.draw2d.Label stereotypeLabel=((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null);
- assertTrue( "text of stereotype label be equals to «stereotype1» " ,stereotypeLabel.getText().equals("«stereotype1»"));
+ assertTrue( "text of stereotype label be equals to" +ST_LEFT+"stereotype1"+ST_RIGHT ,stereotypeLabel.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
}
{//test display of property of stereotype in compartment
@@ -285,7 +288,7 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase {
//get the label
org.eclipse.draw2d.Label stereotypeLabel=((PackageFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null);
- assertTrue( "text of stereotype label be equals to «stereotype1» " ,stereotypeLabel.getText().equals("«stereotype1»"));
+ assertTrue( "text of stereotype label be equals to "+ST_LEFT+"stereotype1"+ST_RIGHT ,stereotypeLabel.getText().equals(ST_LEFT+"stereotype1"+ST_RIGHT));
}
{//test display of property of stereotype in compartment
@@ -303,7 +306,7 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase {
assertNotNull( "the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
assertNotNull( "the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
EditingFlowPage textarea=(EditingFlowPage)stereotypePropertyEdipart.getFigure();
- assertTrue( "text of stereotype label be equals to «stereotype1» " ,((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
+ assertTrue( "text of stereotype label be equals to "+ST_LEFT+"stereotype1"+ST_RIGHT ,((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
}
}

Back to the top