Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Montplaisir2013-01-25 15:05:20 -0500
committerAlexandre Montplaisir2013-01-31 11:50:39 -0500
commitfc5b25ef0aa3a0935bb2d95906838bfab62a1703 (patch)
tree7296251638540bb43911541c0e167bb546b93fe7 /lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests
parent03e1a734d320653229988a1dcc76df7c9f08d9f5 (diff)
downloadorg.eclipse.linuxtools-fc5b25ef0aa3a0935bb2d95906838bfab62a1703.tar.gz
org.eclipse.linuxtools-fc5b25ef0aa3a0935bb2d95906838bfab62a1703.tar.xz
org.eclipse.linuxtools-fc5b25ef0aa3a0935bb2d95906838bfab62a1703.zip
lttng: Port unit tests to JUnit4
Refs bug 393449. Change-Id: I84d3f62d0e1dd1b8bd1d0ad00f3347cc86df6ad2 Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Reviewed-on: https://git.eclipse.org/r/10056 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Diffstat (limited to 'lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests')
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java48
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java25
2 files changed, 15 insertions, 58 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java
index 295f0e180a..5634a3c46a 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java
@@ -12,57 +12,21 @@
package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertTrue;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
/**
- * <b><u>ActivatorTest</u></b>
- * <p>
* Test suite for the Activator class
- * <p>
*/
-@SuppressWarnings("javadoc")
-public class ActivatorTest extends TestCase {
-
- // ------------------------------------------------------------------------
- // JUnit
- // ------------------------------------------------------------------------
-
- @BeforeClass
- public static void setUpBeforeClass() {
- }
-
- @AfterClass
- public static void tearDownAfterClass() {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- @Override
- public void tearDown() throws Exception {
- }
+public class ActivatorTest {
// ------------------------------------------------------------------------
// Tests
// ------------------------------------------------------------------------
/**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.ui.Activator#Activator()}.
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#Activator()}.
*/
@Test
public void testActivator() {
@@ -70,7 +34,7 @@ public class ActivatorTest extends TestCase {
}
/**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.ui.Activator#getDefault()}.
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#getDefault()}.
*/
@Test
public void testGetDefault() {
@@ -78,7 +42,7 @@ public class ActivatorTest extends TestCase {
}
/**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.ui.Activator#start(org.osgi.framework.BundleContext)}.
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#start}.
*/
@Test
public void testStartBundleContext() {
@@ -86,7 +50,7 @@ public class ActivatorTest extends TestCase {
}
/**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.ui.Activator#stop(org.osgi.framework.BundleContext)}.
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#stop}.
*/
@Test
public void testStopBundleContext() {
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java
index b9a4109080..f37fdf03f0 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java
@@ -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,28 +8,21 @@
*
* Contributors:
* Francois Chouinard - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
*******************************************************************************/
package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/**
- * <b><u>AllTests</u></b>
- * <p>
+ * Run the lttng2.ui unit tests.
*/
-@SuppressWarnings("javadoc")
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+})
public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- // $JUnit-BEGIN$
-
- // Plug-in
- suite.addTestSuite(ActivatorTest.class);
-
- // $JUnit-END$
- return suite;
- }
}

Back to the top