ctf: Fix API inconsistencies
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / StreamTest.java
index fd3ea36f7044f7fcc7a1a789794a64baf7d98ba5..a289b02df2652cf838a44405aa00546331f05453 100644 (file)
@@ -8,13 +8,13 @@ import java.util.HashMap;
 import java.util.Set;
 
 import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
 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.internal.ctf.core.event.metadata.exceptions.ParseException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -22,17 +22,18 @@ import org.junit.Test;
 /**
  * The class <code>StreamTest</code> contains tests for the class
  * <code>{@link Stream}</code>.
- * 
+ *
  * @author ematkho
  * @version $Revision: 1.0 $
  */
+@SuppressWarnings("javadoc")
 public class StreamTest {
 
     private Stream fixture;
 
     /**
      * Launch the test.
-     * 
+     *
      * @param args
      *            the command line arguments
      */
@@ -42,8 +43,8 @@ public class StreamTest {
 
     /**
      * Perform pre-test initialization.
-     * 
-     * @throws CTFReaderException 
+     *
+     * @throws CTFReaderException
      */
     @Before
     public void setUp() throws CTFReaderException {
@@ -66,8 +67,8 @@ public class StreamTest {
 
     /**
      * Run the Stream(CTFTrace) constructor test.
-     * 
-     * @throws CTFReaderException 
+     *
+     * @throws CTFReaderException
      */
     @Test
     public void testStream() throws CTFReaderException {
@@ -79,7 +80,7 @@ public class StreamTest {
     /**
      * Run the void addEvent(EventDeclaration) method test with the basic
      * event.
-     * @throws ParseException 
+     * @throws ParseException
      */
     @Test
     public void testAddEvent_base() throws ParseException {
@@ -88,25 +89,18 @@ public class StreamTest {
     }
 
     /**
-     * Run the void addEvent(EventDeclaration) method test with an event 
-     * of which we modified the id.
-     * @throws ParseException 
-     * 
-     * @throws ParseException
+     * Run the boolean eventContextIsSet() method test.
      */
     @Test
-    public void testAddEvent_modifiedEvent() throws ParseException {
-        EventDeclaration event = new EventDeclaration();
-        event.setId(1L);
-        fixture.addEvent(event);
+    public void testEventContextIsSet() {
+        assertTrue(fixture.isEventContextSet());
     }
-
     /**
      * Run the boolean eventContextIsSet() method test.
      */
     @Test
-    public void testEventContextIsSet() {
-        assertTrue(fixture.eventContextIsSet());
+    public void testToString() {
+        assertNotNull(fixture.toString());
     }
 
     /**
@@ -114,7 +108,7 @@ public class StreamTest {
      */
     @Test
     public void testEventHeaderIsSet() {
-        assertTrue(fixture.eventHeaderIsSet());
+        assertTrue(fixture.isEventHeaderSet());
     }
 
     /**
@@ -183,7 +177,7 @@ public class StreamTest {
      */
     @Test
     public void testIdIsSet() {
-        boolean result = fixture.idIsSet();
+        boolean result = fixture.isIdSet();
         assertTrue(result);
     }
 
@@ -192,7 +186,7 @@ public class StreamTest {
      */
     @Test
     public void testPacketContextIsSet() {
-        boolean result = fixture.packetContextIsSet();
+        boolean result = fixture.isPacketContextSet();
         assertTrue(result);
     }
 
This page took 0.094079 seconds and 5 git commands to generate.