tmf: Consolidate all state systems in ITmfTrace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / trace / TmfTraceTest.java
index b104fddfde0c13054e1bb5e3800caa8e327bc8b1..1b957a841643692c9cb83f5daa5dccc206df80ad 100644 (file)
@@ -17,6 +17,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.Collection;
 import java.util.Vector;
 
 import junit.framework.TestCase;
@@ -33,6 +34,8 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
@@ -521,6 +524,28 @@ public class TmfTraceTest extends TestCase {
         trace.dispose();
     }
 
+    // ------------------------------------------------------------------------
+    // State system and statistics methods
+    // ------------------------------------------------------------------------
+
+    public void testGetStatistics() {
+        /* Should be null in unit tests */
+        ITmfStatistics stats = fTrace.getStatistics();
+        assertNull(stats);
+    }
+
+    public void testGetStateSystem() {
+        /* There should be no state system registered so far */
+        ITmfStateSystem ss = fTrace.getStateSystem("something");
+        assertNull(ss);
+    }
+
+    public void testListStateSystem() {
+        Collection<String> sss = fTrace.listStateSystems();
+        assertNotNull(sss);
+        assertEquals(0, sss.size());
+    }
+
     // ------------------------------------------------------------------------
     // seekEvent on location (note: does not reliably set the rank)
     // ------------------------------------------------------------------------
This page took 0.024027 seconds and 5 git commands to generate.