Update Server, breaks API + remove deprecated
[nikiroo-utils.git] / src / be / nikiroo / utils / test / TestCase.java
index 429200b4ceb3d800cb4ace07215ee82cc700fc69..9d0caaa9026ea16530360f57966ccaab584f6b45 100644 (file)
@@ -42,6 +42,7 @@ abstract public class TestCase {
         * @throws Exception
         *             in case of error
         */
+       @SuppressWarnings("unused")
        public void setUp() throws Exception {
        }
 
@@ -51,6 +52,7 @@ abstract public class TestCase {
         * @throws Exception
         *             in case of error
         */
+       @SuppressWarnings("unused")
        public void tearDown() throws Exception {
        }
 
@@ -113,8 +115,8 @@ abstract public class TestCase {
        /**
         * Check that 2 {@link Object}s are equals.
         * 
-        * @param the
-        *            error message to display if they differ
+        * @param errorMessage
+        *            the error message to display if they differ
         * @param expected
         *            the expected value
         * @param actual
@@ -130,10 +132,10 @@ abstract public class TestCase {
                        if (errorMessage == null) {
                                throw new AssertException(generateAssertMessage(expected,
                                                actual));
-                       } else {
-                               throw new AssertException(errorMessage, new AssertException(
-                                               generateAssertMessage(expected, actual)));
                        }
+
+                       throw new AssertException(errorMessage, new AssertException(
+                                       generateAssertMessage(expected, actual)));
                }
        }
 
@@ -155,8 +157,8 @@ abstract public class TestCase {
        /**
         * Check that 2 {@link Object}s are equals.
         * 
-        * @param the
-        *            error message to display if they differ
+        * @param errorMessage
+        *            the error message to display if they differ
         * @param expected
         *            the expected value
         * @param actual
@@ -189,8 +191,8 @@ abstract public class TestCase {
        /**
         * Check that 2 {@link Object}s are equals.
         * 
-        * @param the
-        *            error message to display if they differ
+        * @param errorMessage
+        *            the error message to display if they differ
         * @param expected
         *            the expected value
         * @param actual
@@ -223,8 +225,8 @@ abstract public class TestCase {
        /**
         * Check that 2 {@link Object}s are equals.
         * 
-        * @param the
-        *            error message to display if they differ
+        * @param errorMessage
+        *            the error message to display if they differ
         * @param expected
         *            the expected value
         * @param actual
@@ -241,8 +243,8 @@ abstract public class TestCase {
        /**
         * Check that given {@link Object} is not NULL.
         * 
-        * @param the
-        *            error message to display if it is NULL
+        * @param errorMessage
+        *            the error message to display if it is NULL
         * @param actual
         *            the actual value
         * 
@@ -258,10 +260,10 @@ abstract public class TestCase {
 
                        if (errorMessage == null) {
                                throw new AssertException(defaultReason);
-                       } else {
-                               throw new AssertException(errorMessage, new AssertException(
-                                               defaultReason));
                        }
+
+                       throw new AssertException(errorMessage, new AssertException(
+                                       defaultReason));
                }
        }