Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2014-02-06 09:32:36 +0000
committervlorenzo2014-02-06 09:32:36 +0000
commitc4cb44ab3af3362771331b5a3dd510a45dbc041e (patch)
tree5f112d9a47bb36fb21d78c2c144f2e536fe7c365 /tests/junit/plugins/developer
parent3d1f1f7e8dc12e4c27ef2d2c243a1473e8185d61 (diff)
downloadorg.eclipse.papyrus-c4cb44ab3af3362771331b5a3dd510a45dbc041e.tar.gz
org.eclipse.papyrus-c4cb44ab3af3362771331b5a3dd510a45dbc041e.tar.xz
org.eclipse.papyrus-c4cb44ab3af3362771331b5a3dd510a45dbc041e.zip
Fix some bugs (bundle tests+others)
Diffstat (limited to 'tests/junit/plugins/developer')
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java29
1 files changed, 11 insertions, 18 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..479f6d12ff8 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
@@ -183,31 +183,24 @@ public class BundlesTests {
* the file path
*/
private void fileTest(final String filepath) {
- String message = null;
+ StringBuffer buffer = new StringBuffer();
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();
- }
- }
- }
-
+ URL url = current.getEntry(filepath);
if(url == null) {
- if(message == null) {
- message = "The following bundles don't have the file about.html :"; //$NON-NLS-1$
+ if(buffer.length() == 0) {
+ buffer.append(NLS.bind("The following bundles don't have the file {0}.", filepath)); //$NON-NLS-1$
}
- message += "\n "; //$NON-NLS-1$
- message += current.getSymbolicName();
+ buffer.append("\n");//$NON-NLS-1$
+ buffer.append(current.getSymbolicName());
nb++;
}
}
- Assert.assertNull(nb + " problems!", message); //$NON-NLS-1$
+ StringBuffer errorMessage = new StringBuffer();
+ errorMessage.append(nb);
+ errorMessage.append(" problems!\n"); //$NON-NLS-1$
+ errorMessage.append(buffer.toString());
+ Assert.assertTrue(errorMessage.toString(), buffer.toString().isEmpty());
}
/**

Back to the top