tmf: Update tmf.core unit tests to JUnit4
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / uml2sd / TmfSyncSequenceDiagramEventTest.java
index 2de6f23b719a012506e5d9db9dc4c2c4521f6f83..f14840f74464dcb0997884f43658cc7fb45bd81a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,11 +8,16 @@
  *
  * Contributors:
  *   Bernd Hufmann - Initial API and implementation
+ *   Alexandre Montplaisir - Port to JUnit4
  *******************************************************************************/
+
 package org.eclipse.linuxtools.tmf.core.tests.uml2sd;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
@@ -21,8 +26,13 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent;
 
+import org.junit.Test;
+
+/**
+ * TmfSyncSequenceDiagramEventTest
+ */
 @SuppressWarnings("nls")
-public class TmfSyncSequenceDiagramEventTest extends TestCase {
+public class TmfSyncSequenceDiagramEventTest {
 
     private final String fContext = ITmfEventType.DEFAULT_CONTEXT_ID;
     private final String fTypeId  = "Some type";
@@ -35,22 +45,21 @@ public class TmfSyncSequenceDiagramEventTest extends TestCase {
     private final TmfEventType fType       = new TmfEventType(fContext, fTypeId, TmfEventField.makeRoot(fLabels));
     private final String       fReference  = "Some reference";
 
-    private final TmfEvent fEvent1;
+    private final ITmfEvent fEvent1;
     private final TmfEventField fContent1;
 
-    public TmfSyncSequenceDiagramEventTest () {
+    /**
+     * Constructor for the test case
+     */
+    public TmfSyncSequenceDiagramEventTest() {
         fContent1 = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, "Some content");
         fEvent1 = new TmfEvent(null, fTimestamp1, fSource, fType, fContent1, fReference);
     }
 
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
+    /**
+     * Main test
+     */
+    @Test
     public void testTmfSyncSequenceDiagramEvent() {
         TmfSyncSequenceDiagramEvent event = null;
         try {
This page took 0.025428 seconds and 5 git commands to generate.