Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvlorenzo2013-07-04 09:00:06 +0000
committervlorenzo2013-07-04 09:00:06 +0000
commitf8536c42a2962cf494ce610bd5b3efad79ce40b3 (patch)
tree85f9cb3f8779f93ee503b61067b9a1a47fb0131d /tests
parent447c05f315a34657e3da521db39c308cc7669920 (diff)
downloadorg.eclipse.papyrus-f8536c42a2962cf494ce610bd5b3efad79ce40b3.tar.gz
org.eclipse.papyrus-f8536c42a2962cf494ce610bd5b3efad79ce40b3.tar.xz
org.eclipse.papyrus-f8536c42a2962cf494ce610bd5b3efad79ce40b3.zip
412072: [Table 2] Papyrus must provide tests for the table of views
https://bugs.eclipse.org/bugs/show_bug.cgi?id=412072 Try a correction to avoid the exception org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed) due to while(Display.getDefault.readAndDisplatch());
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/OpenTableTest.java17
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java1
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java1
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java1
4 files changed, 13 insertions, 7 deletions
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/OpenTableTest.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/OpenTableTest.java
index 79974b39022..49330d99fff 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/OpenTableTest.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/OpenTableTest.java
@@ -13,8 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.views.tests.tests;
-import java.util.Collections;
-
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.commands.OpenDiagramCommand;
@@ -27,21 +25,26 @@ import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.junit.utils.GenericUtils;
-import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.PartService;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.osgi.framework.Bundle;
-
+/**
+ * Test the opening of an existing table
+ *
+ * @author vl222926
+ *
+ */
public class OpenTableTest extends AbstractEditorIntegrationTest {
+ @BeforeClass
+ public static void startOfTest() {
+ GenericUtils.closeAllEditors();
+ }
/**
* This test allows to be sure that we doesn't break existing table model
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
index 8402593a81c..ea89e730d74 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
@@ -92,6 +92,7 @@ public class TableCreationTest {
@BeforeClass
public static void init() {
try {
+ GenericUtils.closeAllEditors();
initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
} catch (CoreException e) {
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
index b356ae45e74..570189134cf 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
@@ -100,6 +100,7 @@ public class TableCreationTest2 {
@BeforeClass
public static void init() {
try {
+ GenericUtils.closeAllEditors();
initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
} catch (CoreException e) {
Activator.log.error(e);
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
index a28dc80c290..66ddd37519a 100644
--- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.editor.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
@@ -101,6 +101,7 @@ public class TableVerifyContents {
@BeforeClass
public static void init() {
try {
+ GenericUtils.closeAllEditors();
initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
} catch (CoreException e) {

Back to the top