TMF: Add functions to verify if events are present in a CTF Trace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / TmfCorePluginTest.java
index fe075851593c5af7329d1079ee92169f2b4c3f32..4e09e75cc2b78f740012e7c5bce56d6d9d173a1d 100644 (file)
@@ -1,68 +1,54 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 Ericsson
- * 
+ * Copyright (c) 2009, 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
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
+ *   Alexandre Montplaisir - Port to JUnit4
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.tests;
 
-import org.eclipse.linuxtools.tmf.core.TmfCorePlugin;
+import static org.junit.Assert.assertEquals;
 
-import junit.framework.TestCase;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
+import org.junit.Test;
 
 /**
- * <b><u>TmfCorePluginTest</u></b>
- * <p>
  * Test the TMF core plug-in activator
  */
-@SuppressWarnings("nls")
-public class TmfCorePluginTest extends TestCase {
+public class TmfCorePluginTest {
 
-       // ------------------------------------------------------------------------
+    // ------------------------------------------------------------------------
     // Attributes
-       // ------------------------------------------------------------------------
+    // ------------------------------------------------------------------------
 
-       // Plug-in instantiation
-       static final TmfCorePlugin fPlugin = new TmfCorePlugin();
-       
-       // ------------------------------------------------------------------------
-    // Housekeping
-       // ------------------------------------------------------------------------
+    // Plug-in instantiation
+    static final Activator fPlugin = new Activator();
 
-       /**
-        * @param name the test name
-        */
-       public TmfCorePluginTest(String name) {
-               super(name);
-       }
-
-       @Override
-       protected void setUp() throws Exception {
-               super.setUp();
-       }
-
-       @Override
-       protected void tearDown() throws Exception {
-               super.tearDown();
-       }
-
-       // ------------------------------------------------------------------------
+    // ------------------------------------------------------------------------
     // Test cases
-       // ------------------------------------------------------------------------
-
-       public void testTmfCorePluginId() throws Exception {
-               assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", TmfCorePlugin.PLUGIN_ID);
-       }
-
-       public void testGetDefault() throws Exception {
-               TmfCorePlugin plugin = TmfCorePlugin.getDefault();
-               assertEquals("getDefault()", plugin, fPlugin);
-       }
+    // ------------------------------------------------------------------------
+
+    /**
+     * Test the plugin ID.
+     */
+    @Test
+    public void testTmfCorePluginId() {
+        assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", Activator.PLUGIN_ID);
+    }
+
+    /**
+     * Test the getDefault() static method.
+     */
+    @Test
+    public void testGetDefault() {
+        Activator plugin = Activator.getDefault();
+        assertEquals("getDefault()", plugin, fPlugin);
+    }
 
 }
This page took 0.025288 seconds and 5 git commands to generate.