Fix another pile of Javadoc warnings
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / event / TmfEventTypeManagerTest.java
index cded721241ebdad0b122c448a7cda976818cc2ae..b5a8da94c96764f561b55fee322af64e4117257a 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 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
  *******************************************************************************/
@@ -22,10 +22,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventTypeManager;
 
 /**
- * <b><u>TmfEventTypeManagerTest</u></b>
- * <p>
  * Test suite for the TmfEventTypeManager class.
- * <p>
  */
 @SuppressWarnings("nls")
 public class TmfEventTypeManagerTest extends TestCase {
@@ -46,7 +43,7 @@ public class TmfEventTypeManagerTest extends TestCase {
 
     private final String fLabel0 = "label1";
     private final String fLabel1 = "label2";
-    
+
     private final String[] fLabels0 = new String[] { };
     private final String[] fLabels1 = new String[] { fLabel0, fLabel1 };
     private final String[] fLabels2 = new String[] { fLabel1, fLabel0, fLabel1 };
@@ -63,7 +60,7 @@ public class TmfEventTypeManagerTest extends TestCase {
     /**
      * @param name the test name
      */
-    public TmfEventTypeManagerTest(String name) {
+    public TmfEventTypeManagerTest(final String name) {
         super(name);
     }
 
@@ -81,6 +78,9 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Getters
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testGetContexts() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -88,13 +88,16 @@ public class TmfEventTypeManagerTest extends TestCase {
         fInstance.add(fContext2, fType2);
         fInstance.add(fContext2, fType3);
 
-        String[] contexts = fInstance.getContexts();
+        final String[] contexts = fInstance.getContexts();
         Arrays.sort(contexts);
         assertEquals("getContexts", 2, contexts.length);
         assertEquals("getContexts", fContext1, contexts[0]);
         assertEquals("getContexts", fContext2, contexts[1]);
     }
 
+    /**
+     *
+     */
     public void testGetTypes() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -121,6 +124,9 @@ public class TmfEventTypeManagerTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testGetType() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -151,14 +157,20 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testClear() {
         fInstance.clear();
         assertEquals("clear", 0, fInstance.getContexts().length);
-        assertNull("clear", fInstance.getTypes(null));
+        assertEquals("clear", 0, fInstance.getTypes(null).length);
         assertNull("clear", fInstance.getType(null, null));
         assertEquals("clear", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString());
     }
 
+    /**
+     *
+     */
     public void testClearContext() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -168,12 +180,12 @@ public class TmfEventTypeManagerTest extends TestCase {
 
         fInstance.clear(fContext1);
 
-        String[] contexts = fInstance.getContexts();
+        final String[] contexts = fInstance.getContexts();
         assertEquals("clear context", 1, contexts.length);
         assertEquals("clear context", fContext2, contexts[0]);
 
         ITmfEventType[] types = fInstance.getTypes(fContext1);
-        assertNull("clear context", types);
+        assertEquals("clear context", 0, types.length);
 
         ITmfEventType type = fInstance.getType(fContext1, fType0.getName());
         assertNull("clear context", type);
@@ -190,15 +202,18 @@ public class TmfEventTypeManagerTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testBasicAdd() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
 
-        String[] contexts = fInstance.getContexts();
+        final String[] contexts = fInstance.getContexts();
         assertEquals("add", 1, contexts.length);
         assertEquals("add", fContext1, contexts[0]);
 
-        ITmfEventType[] types = fInstance.getTypes(contexts[0]);
+        final ITmfEventType[] types = fInstance.getTypes(contexts[0]);
         assertEquals("add", 1, types.length);
         assertSame("add", fType0, types[0]);
 
@@ -209,6 +224,9 @@ public class TmfEventTypeManagerTest extends TestCase {
         assertNotSame("add", fType0, type);
     }
 
+    /**
+     *
+     */
     public void testAdd() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -216,7 +234,7 @@ public class TmfEventTypeManagerTest extends TestCase {
         fInstance.add(fContext2, fType2);
         fInstance.add(fContext2, fType3);
 
-        String[] contexts = fInstance.getContexts();
+        final String[] contexts = fInstance.getContexts();
         Arrays.sort(contexts);
         assertEquals("add", 2, contexts.length);
         assertEquals("add", fContext1, contexts[0]);
@@ -259,6 +277,9 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Object
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testToString() {
         fInstance.clear();
         assertEquals("toString", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString());
This page took 0.026094 seconds and 5 git commands to generate.