tmf.test: Use SWTBotJunit4ClassRunner in every SWTBot test
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui.swtbot.tests / src / org / eclipse / tracecompass / tmf / ui / swtbot / tests / viewers / events / SDViewTest.java
index 6e8396858ca78ddb5da162643b1b335862cc19e7..dc3caa3efcd2b20a54775b2d6a7eb880e3c32bc1 100644 (file)
@@ -26,6 +26,7 @@ import org.apache.log4j.SimpleLayout;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
 import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -38,10 +39,12 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test for Sequence Diagram view in trace compass
  */
+@RunWith(SWTBotJunit4ClassRunner.class)
 public class SDViewTest {
 
     private static final String UML2DVIEW_ID = "org.eclipse.linuxtools.tmf.ui.tmfUml2SDSyncView";
@@ -79,7 +82,7 @@ public class SDViewTest {
      */
     @BeforeClass
     public static void init() throws IOException {
-        SWTBotUtils.failIfUIThread();
+        SWTBotUtils.initialize();
         Thread.currentThread().setName("SWTBot Thread"); // for the debugger
         /* set up for swtbot */
         SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
@@ -122,6 +125,7 @@ public class SDViewTest {
      */
     @AfterClass
     public static void cleanUp() {
+        SWTBotUtils.closeViewById(UML2DVIEW_ID, fBot);
         fFileLocation.delete();
         fLogger.removeAllAppenders();
     }
This page took 0.026091 seconds and 5 git commands to generate.