1
package org.eclipse.linuxtools.ctf.core.tests.trace;
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertNotNull;
6
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
7
import org.junit.After;
8
import org.junit.Before;
12
* The class <code>StreamInputPacketIndexEntryTest</code> contains tests for the
13
* class <code>{@link StreamInputPacketIndexEntry}</code>.
16
* @version $Revision: 1.0 $
18
public class StreamInputPacketIndexEntryTest {
20
private StreamInputPacketIndexEntry fixture;
26
* the command line arguments
28
public static void main(String[] args) {
29
new org.junit.runner.JUnitCore().run(StreamInputPacketIndexEntryTest.class);
33
* Perform pre-test initialization.
37
fixture = new StreamInputPacketIndexEntry(1L);
41
* Perform post-test clean-up.
44
public void tearDown() {
45
// Add additional tear down code here
49
* Run the StreamInputPacketIndexEntry(long) constructor test.
52
public void testStreamInputPacketIndexEntry_1() {
53
String expectedResult = "StreamInputPacketIndexEntry [offsetBytes=1, " + //$NON-NLS-1$
54
"timestampBegin=0, timestampEnd=0]"; //$NON-NLS-1$
56
assertNotNull(fixture);
57
assertEquals(expectedResult, fixture.toString());
61
* Run the String toString() method test.
64
public void testToString() {
65
String expectedResult = "StreamInputPacketIndexEntry [offsetBytes=1,"+ //$NON-NLS-1$
66
" timestampBegin=1, timestampEnd=1]"; //$NON-NLS-1$
69
fixture.setContentSizeBits(1);
70
fixture.setDataOffsetBits(1);
71
fixture.setTimestampEnd(1L);
72
fixture.setPacketSizeBits(1);
73
fixture.setTimestampBegin(1L);
75
assertEquals(expectedResult, fixture.toString());
b'\\ No newline at end of file'