aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Sudol2014-04-12 17:24:26 (EDT)
committerWojciech Sudol2014-04-14 05:05:21 (EDT)
commit639812f300812a7b734e108432dffb7ab68c5367 (patch)
treed2667b4f86863b221bad670b620df3c077ead491
parent7c113f7d02a9990ade430399112e7b39b2d394c9 (diff)
downloadeclipse.platform.ui-639812f300812a7b734e108432dffb7ab68c5367.zip
eclipse.platform.ui-639812f300812a7b734e108432dffb7ab68c5367.tar.gz
eclipse.platform.ui-639812f300812a7b734e108432dffb7ab68c5367.tar.bz2
Bug 423751 - [ActivityMgmt] testActivityListener test failed: junit.framework.AssertionFailedErrorrefs/changes/44/24944/1
Signed-off-by: Wojciech Sudol <wojciech.sudol@pl.ibm.com>
-rw-r--r--tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java
index e967a08..463ed71 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java
@@ -263,9 +263,9 @@ public class DynamicTest extends UITestCase {
*
*/
public void testActivityListener() {
+ final String activity_to_listen_name = "Activity 18"; //$NON-NLS-1$
final IActivity activity_to_listen = activityManager
- .getActivity((String) activityManager.getDefinedActivityIds()
- .toArray()[0]);
+ .getActivity("org.eclipse.activity18"); //$NON-NLS-1$
activity_to_listen.addActivityListener(new IActivityListener() {
public void activityChanged(ActivityEvent activityEvent) {
switch (listenerType) {
@@ -297,17 +297,13 @@ public class DynamicTest extends UITestCase {
}
});
// Remove activity and change name consequently
- try {
- fixedModelRegistry.removeActivity(activity_to_listen.getId(),
- activity_to_listen.getName());
- } catch (NotDefinedException e) {
- e.printStackTrace(System.err);
- }
+ fixedModelRegistry.removeActivity(activity_to_listen.getId(),
+ activity_to_listen_name);
assertTrue(listenerType == -1);
// Add activity
listenerType = 5;
fixedModelRegistry.addActivity(activity_to_listen.getId(),
- "Activity 18"); //$NON-NLS-1$ //$NON-NLS-2$
+ activity_to_listen_name);
assertTrue(listenerType == -1);
// Add to enabled activity
listenerType = 6;