Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvlorenzo2013-07-09 15:41:30 +0000
committervlorenzo2013-07-09 15:41:30 +0000
commitfe5a49f9d71e33322c9d2fed3a5d2c6c6ca60952 (patch)
tree19441ea3aa4aaaec83f31fd5e240c97606044711 /tests
parentebbd4078d91ac0664fd669bfad7de96a0c375a0c (diff)
downloadorg.eclipse.papyrus-fe5a49f9d71e33322c9d2fed3a5d2c6c6ca60952.tar.gz
org.eclipse.papyrus-fe5a49f9d71e33322c9d2fed3a5d2c6c6ca60952.tar.xz
org.eclipse.papyrus-fe5a49f9d71e33322c9d2fed3a5d2c6c6ca60952.zip
411109: [Table 2] ContentProvider must be refactored, because they unexisting classes and methods from Papyrus RC4 (offical release)
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java22
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTestCustomProfile.java8
2 files changed, 14 insertions, 16 deletions
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java
index af6090d1dab..de6c8b639fd 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java
@@ -134,7 +134,7 @@ public class UMLRestrictedContentProviderTest {
public void testEmptyTableWithRestriction() {
NattableModelManager modelManager = new NattableModelManager(emptyTable1);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(true);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(0, elements.length);
}
@@ -147,7 +147,7 @@ public class UMLRestrictedContentProviderTest {
public void testEmptyTableWithoutRestriction() {
NattableModelManager modelManager = new NattableModelManager(emptyTable1);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(false);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -178,7 +178,7 @@ public class UMLRestrictedContentProviderTest {
public void testNotEmptyTableWithRestriction() {
NattableModelManager modelManager = new NattableModelManager(notEmptyTable1);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(true);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(1, elements.length);
Assert.assertEquals(elements[0], UMLPackage.eINSTANCE);
@@ -191,7 +191,7 @@ public class UMLRestrictedContentProviderTest {
public void testNotEmptyTableWithoutProfileWithoutRestriction() {
NattableModelManager modelManager = new NattableModelManager(notEmptyTable1);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(false);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -222,7 +222,7 @@ public class UMLRestrictedContentProviderTest {
public void testNotEmptyTableWithProfileWithRestriction() {
NattableModelManager modelManager = new NattableModelManager(notEmptyTable2);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(true);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -246,11 +246,9 @@ public class UMLRestrictedContentProviderTest {
Assert.assertEquals(1, columnContentProvider.getChildren(sysmlBlockProfile).length);
Assert.assertTrue(columnContentProvider.getChildren(umlPackage).length > 0);
}
-
-
-
-
-
-
-
+
+
+
+
+
}
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTestCustomProfile.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTestCustomProfile.java
index 17d2955805b..5c755df0210 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTestCustomProfile.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTestCustomProfile.java
@@ -154,7 +154,7 @@ public class UMLRestrictedContentProviderTestCustomProfile {
public void testWithRestriction() {
NattableModelManager modelManager = new NattableModelManager(table);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(true);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -217,7 +217,7 @@ public class UMLRestrictedContentProviderTestCustomProfile {
public void testWithoutRestriction() {
NattableModelManager modelManager = new NattableModelManager(table);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(false);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(true);
+ columnContentProvider.setIgnoreInheritedElements(true);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -298,7 +298,7 @@ public class UMLRestrictedContentProviderTestCustomProfile {
public void testWithRestrictionWithInheritedProperties() {
NattableModelManager modelManager = new NattableModelManager(table);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(true);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(false);
+ columnContentProvider.setIgnoreInheritedElements(false);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);
@@ -366,7 +366,7 @@ public class UMLRestrictedContentProviderTestCustomProfile {
public void testWithoutRestrictionWithInheritedProperties() {
NattableModelManager modelManager = new NattableModelManager(table);
IRestrictedContentProvider columnContentProvider = modelManager.getColumnAxisManager().createPossibleAxisContentProvider(false);
- ((org.eclipse.papyrus.infra.nattable.provider.tmp.IRestrictedContentProvider)columnContentProvider).setIgnoreInheritedElements(false);
+ columnContentProvider.setIgnoreInheritedElements(false);
Object[] elements = columnContentProvider.getElements();
Assert.assertEquals(2, elements.length);
List<?> roots = Arrays.asList(elements);

Back to the top