Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Lorenzo2013-09-04 10:03:08 -0400
committerVincent Lorenzo2013-09-04 10:03:08 -0400
commitc3ee2d9a2b2be54b9df1775e4021233691733db8 (patch)
treea20980c5fb2255187037f4f8c12aee616413e6ca /tests
parente75db8dbac46a19d461c25edc8c174dae0b5ef44 (diff)
downloadorg.eclipse.papyrus-c3ee2d9a2b2be54b9df1775e4021233691733db8.tar.gz
org.eclipse.papyrus-c3ee2d9a2b2be54b9df1775e4021233691733db8.tar.xz
org.eclipse.papyrus-c3ee2d9a2b2be54b9df1775e4021233691733db8.zip
378990: [Tests] Add JUnit tests to test informations of built plugins
and features Correct the tests to be complient with Eclispe Luna
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
index f0cd8d4ab97..0cb41b8dd1a 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
@@ -17,10 +17,11 @@ import java.lang.reflect.Field;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Enumeration;
import java.util.List;
+import java.util.Enumeration;
-import org.eclipse.osgi.framework.internal.core.BundleFragment;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.internal.framework.EquinoxBundle;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.core.feature.Feature;
import org.junit.Assert;
@@ -187,20 +188,23 @@ public class BundlesTests {
int nb = 0;
for(final Bundle current : BundleTestsUtils.getPapyrusBundles()) {
URL url = current.getResource(filepath);
- //specific behavior for the fragment!
- if((url == null) && (current instanceof BundleFragment)) {
- final BundleFragment fragment = (BundleFragment)current;
- final Enumeration<URL> entries = fragment.findEntries("/", filepath, false); //$NON-NLS-1$
- if(entries != null) {
- if(entries.hasMoreElements()) {
- url = entries.nextElement();
- }
- }
- }
+ // specific behavior for the fragment!
+
+ //never provides the url, so commented...
+ // if((url == null) && current instanceof EquinoxBundle) {// Platform.isFragment(current))
+ // // {
+ // final EquinoxBundle equinoxBundle = (EquinoxBundle)current;
+ // final Enumeration<URL> entries = equinoxBundle.findEntries("/", filepath, true);
+ // if(entries != null) {
+ // if(entries.hasMoreElements()) {
+ // url = entries.nextElement();
+ // }
+ // }
+ // }
if(url == null) {
if(message == null) {
- message = "The following bundles don't have the file about.html :"; //$NON-NLS-1$
+ message = NLS.bind("The following bundles don't have the file {0}.", filepath); //$NON-NLS-1$
}
message += "\n "; //$NON-NLS-1$
message += current.getSymbolicName();

Back to the top