rcp: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core.tests / src / org / eclipse / tracecompass / ctf / core / tests / types / EventDeclarationTest.java
index 31944ae360adb41c5c54ad1b916199e8934d0cc3..1d20b241532998d8e00f0bfe95dc105a716df754 100644 (file)
@@ -18,8 +18,10 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeTrue;
 
-import org.eclipse.tracecompass.ctf.core.CTFReaderException;
+import org.eclipse.tracecompass.ctf.core.CTFException;
 import org.eclipse.tracecompass.ctf.core.event.EventDefinition;
+import org.eclipse.tracecompass.ctf.core.event.IEventDeclaration;
+import org.eclipse.tracecompass.ctf.core.event.LostEventDeclaration;
 import org.eclipse.tracecompass.ctf.core.event.types.StructDeclaration;
 import org.eclipse.tracecompass.ctf.core.tests.shared.CtfTestTrace;
 import org.eclipse.tracecompass.ctf.core.trace.CTFStream;
@@ -46,10 +48,10 @@ public class EventDeclarationTest {
     /**
      * Perform pre-test initialization.
      *
-     * @throws CTFReaderException
+     * @throws CTFException
      */
     @Before
-    public void setUp() throws CTFReaderException {
+    public void setUp() throws CTFException {
         assumeTrue(testTrace.exists());
         fixture = new EventDeclaration();
         fixture.setContext(new StructDeclaration(1L));
@@ -91,10 +93,10 @@ public class EventDeclarationTest {
     /**
      * Run the boolean equals(Object) method test.
      *
-     * @throws CTFReaderException
+     * @throws CTFException
      */
     @Test
-    public void testEquals() throws CTFReaderException {
+    public void testEquals() throws CTFException {
         EventDeclaration obj = new EventDeclaration();
         obj.setContext(new StructDeclaration(1L));
         obj.setId(1L);
@@ -311,10 +313,10 @@ public class EventDeclarationTest {
     /**
      * Test for the EventDefinition class
      *
-     * @throws CTFReaderException
+     * @throws CTFException
      */
     @Test
-    public void testEventDefinition() throws CTFReaderException {
+    public void testEventDefinition() throws CTFException {
         CTFTrace trace = testTrace.getTrace();
         EventDefinition ed = null;
         try (CTFTraceReader tr = new CTFTraceReader(trace);) {
@@ -336,8 +338,8 @@ public class EventDeclarationTest {
         assertNotNull(ed.toString());
     }
 
-    EventDeclaration e1;
-    EventDeclaration e2;
+    IEventDeclaration e1;
+    IEventDeclaration e2;
 
     @Test
     public void testEquals1() {
@@ -347,26 +349,26 @@ public class EventDeclarationTest {
 
     @Test
     public void testEquals2() {
-        e1 = EventDeclaration.getLostEventDeclaration();
+        e1 = LostEventDeclaration.INSTANCE;
         assertFalse(e1.equals(new Long(23L)));
     }
 
     @Test
     public void testEquals3() {
-        e1 = EventDeclaration.getLostEventDeclaration();
+        e1 = LostEventDeclaration.INSTANCE;
         assertEquals(e1, e1);
     }
 
     @Test
     public void testEquals4() {
-        e1 = EventDeclaration.getLostEventDeclaration();
-        e2 = EventDeclaration.getLostEventDeclaration();
+        e1 = LostEventDeclaration.INSTANCE;
+        e2 = LostEventDeclaration.INSTANCE;
         assertEquals(e1, e2);
     }
 
     @Test
     public void testEquals5() {
-        e1 = EventDeclaration.getLostEventDeclaration();
+        e1 = LostEventDeclaration.INSTANCE;
         e2 = new EventDeclaration();
         assertFalse(e1.equals(e2));
     }
This page took 0.025441 seconds and 5 git commands to generate.