diff options
author | vlorenzo | 2014-02-06 09:32:36 +0000 |
---|---|---|
committer | vlorenzo | 2014-02-06 09:32:36 +0000 |
commit | c4cb44ab3af3362771331b5a3dd510a45dbc041e (patch) | |
tree | 5f112d9a47bb36fb21d78c2c144f2e536fe7c365 /tests/junit | |
parent | 3d1f1f7e8dc12e4c27ef2d2c243a1473e8185d61 (diff) | |
download | org.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')
7 files changed, 54 insertions, 21 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());
}
/**
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..0e0524c3d22 --- /dev/null +++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.sysml.diagram.requirement.tests
+providerName = Eclispe Modeling Project
+pluginName = Papyrus Tests For Requirements Diagram (Incubation)
\ No newline at end of file diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties index 41eb6ade2b4..952fceb66cc 100644 --- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties +++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties @@ -1,4 +1,8 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ about.html,\
+ build.properties,\
+ OSGI-INF/l10n/bundle.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF index 839815b11df..d3285ae1654 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF @@ -18,9 +18,10 @@ Export-Package: org.eclipse.papyrus.uml.diagram.pkg.tests, org.eclipse.papyrus.uml.diagram.pkg.tests.load
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.10.2.qualifier
-Bundle-Name: Tests
+Bundle-Name: %pluginName
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.uml.diagram.pkg.tests.Activator
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.pkg.tests
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..4f72e67d4c9 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.uml.diagram.pkg.tests
+providerName = Eclipse Modeling Project
+pluginName = Papyrus Tests for Package Diagram (Incubation)
\ No newline at end of file diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties index 785a40c0ec7..7bdf9b92b56 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties @@ -2,5 +2,6 @@ source.. = src/ output.. = bin/
bin.includes = META-INF/,\
.,\
- about.html
+ about.html,\
+ OSGI-INF/l10n/bundle.properties
src.includes = about.html
|