import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* The class <code>StreamInputReaderTest</code> contains tests for the class
* <code>{@link StreamInputReader}</code>.
- *
+ *
* @author ematkho
* @version $Revision: 1.0 $
*/
/**
* Launch the test.
- *
+ *
* @param args
* the command line arguments
*/
/**
* Perform pre-test initialization.
+ *
+ * @throws CTFReaderException
*/
@Before
- public void setUp() {
- fixture = createStreamInputReader();
+ public void setUp() throws CTFReaderException {
+ fixture = getStreamInputReader();
fixture.setName(1);
fixture.setCurrentEvent(new EventDefinition(new EventDeclaration(),
- createStreamInputReader()));
+ getStreamInputReader()));
}
/**
// Add additional tear down code here
}
- private static StreamInputReader createStreamInputReader() {
+ private static StreamInputReader getStreamInputReader() throws CTFReaderException {
CTFTrace trace = TestParams.createTrace();
Stream s = trace.getStream((long) 0);
Set<StreamInput> streamInput = s.getStreamInputs();
/**
* Run the StreamInputReader(StreamInput) constructor test, with an invalid
* trace.
- *
+ *
* @throws CTFReaderException
*/
@Test(expected = CTFReaderException.class)
assertEquals(1, result);
}
- /**
- * Run the StreamInput getStreamInput() method test.
- */
- @Test
- public void testGetStreamInput() {
- StreamInput result = fixture.getStreamInput();
- assertNotNull(result);
- }
-
/**
* Run the void goToLastEvent() method test.
- *
+ *
* @throws CTFReaderException
*/
@Test
/**
* Run the seek test. Seek by passing an EventDefinition to which we've
* given the timestamp we want.
+ *
+ * @throws CTFReaderException
*/
@Test
- public void testSeek_eventDefinition() {
+ public void testSeek_eventDefinition() throws CTFReaderException {
EventDefinition eventDefinition = new EventDefinition(
- new EventDeclaration(), createStreamInputReader());
+ new EventDeclaration(), getStreamInputReader());
eventDefinition.timestamp = 1L;
fixture.setCurrentEvent(eventDefinition);
}