diff options
author | Arthur Daussy | 2014-07-01 15:29:29 +0000 |
---|---|---|
committer | Mikael Barbero | 2014-07-07 12:26:07 +0000 |
commit | 4c60210fd4816f1923d4c48826941d2caf5792ef (patch) | |
tree | ea4565f91b01e5fb5d524f7aed52c223b7b1c1bb /plugins/org.eclipse.emf.compare.uml2.tests/src | |
parent | 6474b03e2bb42855895d4a0736451d1aabc16b08 (diff) | |
download | org.eclipse.emf.compare-4c60210fd4816f1923d4c48826941d2caf5792ef.tar.gz org.eclipse.emf.compare-4c60210fd4816f1923d4c48826941d2caf5792ef.tar.xz org.eclipse.emf.compare-4c60210fd4816f1923d4c48826941d2caf5792ef.zip |
Test integration of profiles in EMF Compare.
Adds two tests to test the display of static and dynamic profile in EMF
Compare.
Change-Id: Ide7245bf03651e1850b481cd6b39183ef6b25902
Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests/src')
-rw-r--r-- | plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/edit/provider/StereotypedElementItemProviderTestUtil.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/edit/provider/StereotypedElementItemProviderTestUtil.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/edit/provider/StereotypedElementItemProviderTestUtil.java index 9823ce6cc..70bf7b55f 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/edit/provider/StereotypedElementItemProviderTestUtil.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/edit/provider/StereotypedElementItemProviderTestUtil.java @@ -37,7 +37,9 @@ import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.Stereotype; /** - * Util class for testing the {@link org.eclipse.emf.compare.uml2.internal.provider.decorator.UMLProfileItemProviderAdapterFactoryDecorator}. + * Util class for testing the + * {@link org.eclipse.emf.compare.uml2.internal.provider.decorator.UMLProfileItemProviderAdapterFactoryDecorator} + * . * * @author <a href="mailto:arthur.daussy@obeo.fr">Arthur Daussy</a> */ @@ -70,8 +72,7 @@ public class StereotypedElementItemProviderTestUtil { assertEquals(1, actualIcons.size()); assertEquals( "Wrong icon for stereotypes :" + generateExpectedIconKey(appliedStereotypes), //$NON-NLS-1$ - getExpectedIcon(appliedStereotypes, expectedStaticIcons), actualIcons - .get(0)); + getExpectedIcon(appliedStereotypes, expectedStaticIcons), actualIcons.get(0)); } else { assertNotNull(itemLabelProvider); assertTrue("Wrong item provider for object " + itemLabelProvider.getText(eObject), //$NON-NLS-1$ @@ -95,7 +96,17 @@ public class StereotypedElementItemProviderTestUtil { return Joiner.on(',').join(Iterables.transform(stereotypes, TO_NAME_FUNCTION)); } - private static List<String> getIconsLocation(Object icon) { + /** + * Retrieves the name of each icon from the object returned by an item provider. + * <p> + * The name of an icon is only the last segment of its full path location + * </p> + * + * @param icon + * Object returned by the {@link org.eclipse.emf.edit.provider.ItemProvider#getImage()} method. + * @return A list of name of icon. + */ + public static List<String> getIconsLocation(Object icon) { final List<String> result = Lists.newArrayList(); if (icon instanceof ComposedImage) { for (Object image : ((ComposedImage)icon).getImages()) { |