aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/junit/framework/TestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/junit/framework/TestCase.java')
-rw-r--r--src/main/java/junit/framework/TestCase.java47
1 files changed, 5 insertions, 42 deletions
diff --git a/src/main/java/junit/framework/TestCase.java b/src/main/java/junit/framework/TestCase.java
index b89ce71..e474a64 100644
--- a/src/main/java/junit/framework/TestCase.java
+++ b/src/main/java/junit/framework/TestCase.java
@@ -73,6 +73,7 @@ import java.lang.reflect.Modifier;
* @see TestResult
* @see TestSuite
*/
+@SuppressWarnings("deprecation")
public abstract class TestCase extends Assert implements Test {
/**
* the name of the test case
@@ -102,7 +103,7 @@ public abstract class TestCase extends Assert implements Test {
}
/**
- * Creates a default TestResult object
+ * Creates a default TestResult object.
*
* @see TestResult
*/
@@ -187,7 +188,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that a condition is true. If it isn't it throws
* an AssertionFailedError with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertTrue(String message, boolean condition) {
Assert.assertTrue(message, condition);
}
@@ -196,7 +196,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that a condition is true. If it isn't it throws
* an AssertionFailedError.
*/
- @SuppressWarnings("deprecation")
public static void assertTrue(boolean condition) {
Assert.assertTrue(condition);
}
@@ -205,7 +204,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that a condition is false. If it isn't it throws
* an AssertionFailedError with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertFalse(String message, boolean condition) {
Assert.assertFalse(message, condition);
}
@@ -214,7 +212,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that a condition is false. If it isn't it throws
* an AssertionFailedError.
*/
- @SuppressWarnings("deprecation")
public static void assertFalse(boolean condition) {
Assert.assertFalse(condition);
}
@@ -222,7 +219,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Fails a test with the given message.
*/
- @SuppressWarnings("deprecation")
public static void fail(String message) {
Assert.fail(message);
}
@@ -230,7 +226,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Fails a test with no message.
*/
- @SuppressWarnings("deprecation")
public static void fail() {
Assert.fail();
}
@@ -239,7 +234,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two objects are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, Object expected, Object actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -248,7 +242,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two objects are equal. If they are not
* an AssertionFailedError is thrown.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(Object expected, Object actual) {
Assert.assertEquals(expected, actual);
}
@@ -256,7 +249,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two Strings are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, String expected, String actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -264,7 +256,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two Strings are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String expected, String actual) {
Assert.assertEquals(expected, actual);
}
@@ -274,7 +265,6 @@ public abstract class TestCase extends Assert implements Test {
* an AssertionFailedError is thrown with the given message. If the expected
* value is infinity then the delta value is ignored.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, double expected, double actual, double delta) {
Assert.assertEquals(message, expected, actual, delta);
}
@@ -283,7 +273,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two doubles are equal concerning a delta. If the expected
* value is infinity then the delta value is ignored.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(double expected, double actual, double delta) {
Assert.assertEquals(expected, actual, delta);
}
@@ -293,7 +282,6 @@ public abstract class TestCase extends Assert implements Test {
* are not an AssertionFailedError is thrown with the given message. If the
* expected value is infinity then the delta value is ignored.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, float expected, float actual, float delta) {
Assert.assertEquals(message, expected, actual, delta);
}
@@ -302,7 +290,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two floats are equal concerning a delta. If the expected
* value is infinity then the delta value is ignored.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(float expected, float actual, float delta) {
Assert.assertEquals(expected, actual, delta);
}
@@ -311,7 +298,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two longs are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, long expected, long actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -319,7 +305,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two longs are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(long expected, long actual) {
Assert.assertEquals(expected, actual);
}
@@ -328,7 +313,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two booleans are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, boolean expected, boolean actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -336,7 +320,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two booleans are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(boolean expected, boolean actual) {
Assert.assertEquals(expected, actual);
}
@@ -345,7 +328,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two bytes are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, byte expected, byte actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -353,7 +335,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two bytes are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(byte expected, byte actual) {
Assert.assertEquals(expected, actual);
}
@@ -362,7 +343,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two chars are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, char expected, char actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -370,7 +350,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two chars are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(char expected, char actual) {
Assert.assertEquals(expected, actual);
}
@@ -379,7 +358,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two shorts are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, short expected, short actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -387,7 +365,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two shorts are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(short expected, short actual) {
Assert.assertEquals(expected, actual);
}
@@ -396,7 +373,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two ints are equal. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(String message, int expected, int actual) {
Assert.assertEquals(message, expected, actual);
}
@@ -404,7 +380,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that two ints are equal.
*/
- @SuppressWarnings("deprecation")
public static void assertEquals(int expected, int actual) {
Assert.assertEquals(expected, actual);
}
@@ -412,7 +387,6 @@ public abstract class TestCase extends Assert implements Test {
/**
* Asserts that an object isn't null.
*/
- @SuppressWarnings("deprecation")
public static void assertNotNull(Object object) {
Assert.assertNotNull(object);
}
@@ -421,7 +395,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that an object isn't null. If it is
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertNotNull(String message, Object object) {
Assert.assertNotNull(message, object);
}
@@ -433,7 +406,6 @@ public abstract class TestCase extends Assert implements Test {
*
* @param object Object to check or <code>null</code>
*/
- @SuppressWarnings("deprecation")
public static void assertNull(Object object) {
Assert.assertNull(object);
}
@@ -442,7 +414,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that an object is null. If it is not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertNull(String message, Object object) {
Assert.assertNull(message, object);
}
@@ -451,7 +422,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two objects refer to the same object. If they are not
* an AssertionFailedError is thrown with the given message.
*/
- @SuppressWarnings("deprecation")
public static void assertSame(String message, Object expected, Object actual) {
Assert.assertSame(message, expected, actual);
}
@@ -460,7 +430,6 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two objects refer to the same object. If they are not
* the same an AssertionFailedError is thrown.
*/
- @SuppressWarnings("deprecation")
public static void assertSame(Object expected, Object actual) {
Assert.assertSame(expected, actual);
}
@@ -470,7 +439,6 @@ public abstract class TestCase extends Assert implements Test {
* refer to the same object an AssertionFailedError is thrown with the
* given message.
*/
- @SuppressWarnings("deprecation")
public static void assertNotSame(String message, Object expected, Object actual) {
Assert.assertNotSame(message, expected, actual);
}
@@ -479,27 +447,22 @@ public abstract class TestCase extends Assert implements Test {
* Asserts that two objects do not refer to the same object. If they do
* refer to the same object an AssertionFailedError is thrown.
*/
- @SuppressWarnings("deprecation")
public static void assertNotSame(Object expected, Object actual) {
Assert.assertNotSame(expected, actual);
}
- @SuppressWarnings("deprecation")
public static void failSame(String message) {
Assert.failSame(message);
}
- @SuppressWarnings("deprecation")
public static void failNotSame(String message, Object expected, Object actual) {
Assert.failNotSame(message, expected, actual);
}
- @SuppressWarnings("deprecation")
public static void failNotEquals(String message, Object expected, Object actual) {
Assert.failNotEquals(message, expected, actual);
}
- @SuppressWarnings("deprecation")
public static String format(String message, Object expected, Object actual) {
return Assert.format(message, expected, actual);
}
@@ -519,7 +482,7 @@ public abstract class TestCase extends Assert implements Test {
}
/**
- * Returns a string representation of the test case
+ * Returns a string representation of the test case.
*/
@Override
public String toString() {
@@ -527,7 +490,7 @@ public abstract class TestCase extends Assert implements Test {
}
/**
- * Gets the name of a TestCase
+ * Gets the name of a TestCase.
*
* @return the name of the TestCase
*/
@@ -536,7 +499,7 @@ public abstract class TestCase extends Assert implements Test {
}
/**
- * Sets the name of a TestCase
+ * Sets the name of a TestCase.
*
* @param name the name to set
*/