Re-structure LTTng sub-project as per the Linux Tools guidelines
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / src / org / eclipse / linuxtools / tmf / ui / tests / views / uml2sd / impl / TmfUml2SDSyncLoaderTimeTest.java
index b4729111ad08e5391edbe425cc51dfd45647b977..92a5ec8617e4c977192bbda94bcea0f109eb7c2d 100644 (file)
@@ -13,12 +13,14 @@ package org.eclipse.linuxtools.tmf.ui.tests.views.uml2sd.impl;
 
 import java.util.List;
 
+import junit.framework.Test;
 import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.tmf.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.signal.TmfRangeSynchSignal;
-import org.eclipse.linuxtools.tmf.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.impl.TmfSyncMessage;
 
@@ -74,13 +76,25 @@ public class TmfUml2SDSyncLoaderTimeTest extends TestCase {
     final static private Uml2SDTestTimestamp TC_008_END_TIME_VALUE   = new Uml2SDTestTimestamp(9789164833324L);
 
     // Test case 009 expected values
-    final static private Uml2SDTestTimestamp TC_009_TIME_VALUE       = new Uml2SDTestTimestamp(9789773782043L);
-    final static private int                 TC_009_PAGE_VALUE       = 2;
-    final static private Uml2SDTestTimestamp TC_009_START_TIME_VALUE = new Uml2SDTestTimestamp(9789689220871L);
+    final static private Uml2SDTestTimestamp TC_009_TIME_VALUE       = new Uml2SDTestTimestamp(9789689220871L);
+    final static private int                 TC_009_PAGE_VALUE       = 1;
+    final static private Uml2SDTestTimestamp TC_009_START_TIME_VALUE = TC_009_TIME_VALUE;
     final static private Uml2SDTestTimestamp TC_009_END_TIME_VALUE   = new Uml2SDTestTimestamp(9789773881426L);
     
     private Uml2SDTestFacility fFacility;
 
+    // ------------------------------------------------------------------------
+    // Static methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns test setup used when executing test case stand-alone.
+     * @return Test setup class 
+     */
+    public static Test suite() {
+        return new Uml2SDTestSetup(new TestSuite(TmfUml2SDSyncLoaderTimeTest.class));
+    }
+    
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -94,7 +108,6 @@ public class TmfUml2SDSyncLoaderTimeTest extends TestCase {
     public void setUp() throws Exception {
         super.setUp();
         fFacility = Uml2SDTestFacility.getInstance();
-        fFacility.init(false);
         fFacility.selectExperiment();
     }
 
@@ -102,7 +115,6 @@ public class TmfUml2SDSyncLoaderTimeTest extends TestCase {
     @Override
     public void tearDown() throws Exception {
         fFacility.disposeExperiment();
-        fFacility.dispose();
         fFacility = null;
         super.tearDown();
     }
@@ -237,7 +249,7 @@ public class TmfUml2SDSyncLoaderTimeTest extends TestCase {
         * Test Case: 008
         * Description: Verify time range signal (start, end time and current time are in same  page)  
         * Verified Methods: loader.synchToTimeRange(), loader.moveToMessage(), loader.moveToMessageInPage()
-        * Expected result: Move to correct page, set focus on current time, but no selection of message.
+        * Expected result: Move to correct page(=page of start time of range), set focus on start time of range, but no selection of message.
         */
         // 9788.642228395 (page 0) -> 9789.164833324 (page 0) with selected time 9788.642228395 (page 0)
         fFacility.getLoader().firstPage();
@@ -255,9 +267,9 @@ public class TmfUml2SDSyncLoaderTimeTest extends TestCase {
         
         /*
          * Test Case: 009
-         * Description: Verify time range signal (start and end time are across 2 pages, current time is on 2nd page)  
+         * Description: Verify time range signal (start and end time are across 2 pages)  
          * Verified Methods: loader.synchToTimeRange(), loader.moveToMessage(), loader.moveToPage()
-         * Expected result: Move to correct page (page of current time), set focus on current time, but no selection of message.
+         * Expected result: Move to correct page (=page of start time of range), set focus on start time of range, but no selection of message.
          */
         range = new TmfTimeRange(TC_009_START_TIME_VALUE, TC_009_END_TIME_VALUE);
         fFacility.getTrace().broadcast(new TmfRangeSynchSignal(this, range, TC_009_TIME_VALUE));
This page took 0.024862 seconds and 5 git commands to generate.