Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-04-06 17:34:05 -0400
committeratikhomirov2010-04-06 17:34:05 -0400
commite427a40f0a1feca05e37367a111e2cdeb44f074c (patch)
tree5baf852d99e9cbd9d38821e54f5e2f3ad5a1b027
parent5669180578b2c6e0b20679ceb32746326179e4e8 (diff)
downloadorg.eclipse.gmf-tooling-e427a40f0a1feca05e37367a111e2cdeb44f074c.tar.gz
org.eclipse.gmf-tooling-e427a40f0a1feca05e37367a111e2cdeb44f074c.tar.xz
org.eclipse.gmf-tooling-e427a40f0a1feca05e37367a111e2cdeb44f074c.zip
refactoring to share common code
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/Utils.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/Utils.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/Utils.java
index b65112061..da5d38209 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/Utils.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008 Borland Software Corporation
+ * Copyright (c) 2005, 2010 Borland Software Corporation and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -13,6 +13,8 @@ package org.eclipse.gmf.tests;
import java.util.Calendar;
+import junit.framework.Assert;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier;
@@ -107,4 +109,14 @@ public class Utils {
}
return true;
}
+
+ public static void assertDispatchDisplayMessages(int timeoutSeconts) {
+ boolean queueCleared = dispatchDisplayMessages(3);
+ Assert.assertTrue("Display message redispatch was not expected to end by timeout", queueCleared);
+ }
+
+ public static void assertDispatchDisplayMessages(boolean[] condition, int timeoutSeconds) {
+ boolean conditionSatisfied = Utils.dispatchDisplayMessages(condition, 10);
+ Assert.assertTrue("Timeout while waiting for jobs to complete", conditionSatisfied);
+ }
}

Back to the top