ctf: Allow the test traces to be used by other plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / StreamInputReaderTest.java
index 9e2f30888fe34afc1064d6002c2c2471125f2db9..d627fc55551028aaaa88e66f903804a6c474326f 100644 (file)
@@ -10,7 +10,7 @@ import java.util.Set;
 
 import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
-import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTraces;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
@@ -31,6 +31,8 @@ import org.junit.Test;
 @SuppressWarnings("javadoc")
 public class StreamInputReaderTest {
 
+    private static final int TRACE_INDEX = 0;
+
     private StreamInputReader fixture;
 
     /**
@@ -65,8 +67,8 @@ public class StreamInputReaderTest {
     }
 
     private static StreamInputReader getStreamInputReader() throws CTFReaderException {
-        assumeTrue(TestParams.tracesExist());
-        CTFTrace trace = TestParams.createTrace();
+        assumeTrue(CtfTestTraces.tracesExist());
+        CTFTrace trace = CtfTestTraces.getTestTrace(TRACE_INDEX);
         Stream s = trace.getStream((long) 0);
         Set<StreamInput> streamInput = s.getStreamInputs();
         StreamInputReader retVal = null;
@@ -101,7 +103,7 @@ public class StreamInputReaderTest {
     @Test(expected = CTFReaderException.class)
     public void testStreamInputReader_invalid() throws CTFReaderException {
         StreamInput streamInput = new StreamInput(
-                new Stream(new CTFTrace("")), (FileChannel) null, TestParams.getEmptyFile()); //$NON-NLS-1$
+                new Stream(new CTFTrace("")), (FileChannel) null, CtfTestTraces.getEmptyFile()); //$NON-NLS-1$
 
         StreamInputReader result = new StreamInputReader(streamInput);
         assertNotNull(result);
This page took 0.023868 seconds and 5 git commands to generate.