lttng: Port unit tests to JUnit4
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / src / org / eclipse / linuxtools / lttng2 / ui / tests / control / model / component / TraceControlTreeModelNoProvidersTest.java
index 70095241e04299ea37980a82711916ae8c30910a..4ee059472702e6934af158270186646324f68b4a 100644 (file)
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 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,16 +8,20 @@
  *
  * Contributors:
  *   Bernd Hufmann - Initial API and implementation
+ *   Alexandre Montplaisir - Port to JUnit4
  **********************************************************************/
+
 package org.eclipse.linuxtools.lttng2.ui.tests.control.model.component;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.net.URL;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.TargetNodeState;
@@ -36,15 +40,16 @@ import org.eclipse.rse.core.model.ISystemRegistry;
 import org.eclipse.swt.graphics.Image;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Test;
 import org.osgi.framework.FrameworkUtil;
 
 /**
  * The class <code>TraceControlTreeModelNoProvidersTest</code> verifies that the
- * Tracer Control can handle the case where no kernel provider and only UST provider
- * are available.
+ * Tracer Control can handle the case where no kernel provider and only UST
+ * provider are available.
  */
 @SuppressWarnings("nls")
-public class TraceControlTreeModelNoProvidersTest extends TestCase {
+public class TraceControlTreeModelNoProvidersTest {
 
     // ------------------------------------------------------------------------
     // Constants
@@ -61,18 +66,6 @@ public class TraceControlTreeModelNoProvidersTest extends TestCase {
     private TestRemoteSystemProxy fProxy;
     private String fTestFile;
 
-    // ------------------------------------------------------------------------
-    // Static methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * Returns test setup used when executing test case stand-alone.
-     * @return Test setup class
-     */
-    public static Test suite() {
-        return new ModelImplTestSetup(new TestSuite(TraceControlTreeModelNoProvidersTest.class));
-    }
-
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
@@ -82,9 +75,7 @@ public class TraceControlTreeModelNoProvidersTest extends TestCase {
      *
      * @throws Exception
      *         if the initialization fails for some reason
-     *
      */
-    @Override
     @Before
     public void setUp() throws Exception {
         fProxy = new TestRemoteSystemProxy();
@@ -95,14 +86,9 @@ public class TraceControlTreeModelNoProvidersTest extends TestCase {
 
     /**
      * Perform post-test clean-up.
-     *
-     * @throws Exception
-     *         if the clean-up fails for some reason
-     *
      */
-    @Override
     @After
-    public void tearDown()  throws Exception {
+    public void tearDown()  {
         TraceControlTestFacility.getInstance().waitForJobs();
     }
 
@@ -112,6 +98,7 @@ public class TraceControlTreeModelNoProvidersTest extends TestCase {
      * @throws Exception
      *             This will fail the test
      */
+    @Test
     public void testTraceControlComponents() throws Exception {
 
         fProxy.setTestFile(fTestFile);
This page took 0.027255 seconds and 5 git commands to generate.