X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Ftest%2FTestCase.java;h=9d0caaa9026ea16530360f57966ccaab584f6b45;hb=79ce1a4973eba079ba819ba841d906de42f38e40;hp=429200b4ceb3d800cb4ace07215ee82cc700fc69;hpb=c37cc6902542f0b790d7b9c999447bf81a9e9837;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/test/TestCase.java b/src/be/nikiroo/utils/test/TestCase.java index 429200b..9d0caaa 100644 --- a/src/be/nikiroo/utils/test/TestCase.java +++ b/src/be/nikiroo/utils/test/TestCase.java @@ -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)); } }