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, 42 insertions, 5 deletions
diff --git a/src/main/java/junit/framework/TestCase.java b/src/main/java/junit/framework/TestCase.java
index e474a64..b89ce71 100644
--- a/src/main/java/junit/framework/TestCase.java
+++ b/src/main/java/junit/framework/TestCase.java
@@ -73,7 +73,6 @@ 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
@@ -103,7 +102,7 @@ public abstract class TestCase extends Assert implements Test {
}
/**
- * Creates a default TestResult object.
+ * Creates a default TestResult object
*
* @see TestResult
*/
@@ -188,6 +187,7 @@ 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,6 +196,7 @@ 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);
}
@@ -204,6 +205,7 @@ 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);
}
@@ -212,6 +214,7 @@ 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);
}
@@ -219,6 +222,7 @@ 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);
}
@@ -226,6 +230,7 @@ public abstract class TestCase extends Assert implements Test {
/**
* Fails a test with no message.
*/
+ @SuppressWarnings("deprecation")
public static void fail() {
Assert.fail();
}
@@ -234,6 +239,7 @@ 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);
}
@@ -242,6 +248,7 @@ 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);
}
@@ -249,6 +256,7 @@ 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);
}
@@ -256,6 +264,7 @@ 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);
}
@@ -265,6 +274,7 @@ 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);
}
@@ -273,6 +283,7 @@ 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);
}
@@ -282,6 +293,7 @@ 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);
}
@@ -290,6 +302,7 @@ 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);
}
@@ -298,6 +311,7 @@ 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);
}
@@ -305,6 +319,7 @@ 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);
}
@@ -313,6 +328,7 @@ 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);
}
@@ -320,6 +336,7 @@ 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);
}
@@ -328,6 +345,7 @@ 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);
}
@@ -335,6 +353,7 @@ 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);
}
@@ -343,6 +362,7 @@ 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);
}
@@ -350,6 +370,7 @@ 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);
}
@@ -358,6 +379,7 @@ 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);
}
@@ -365,6 +387,7 @@ 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);
}
@@ -373,6 +396,7 @@ 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);
}
@@ -380,6 +404,7 @@ 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);
}
@@ -387,6 +412,7 @@ 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);
}
@@ -395,6 +421,7 @@ 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);
}
@@ -406,6 +433,7 @@ 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);
}
@@ -414,6 +442,7 @@ 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);
}
@@ -422,6 +451,7 @@ 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);
}
@@ -430,6 +460,7 @@ 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);
}
@@ -439,6 +470,7 @@ 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);
}
@@ -447,22 +479,27 @@ 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);
}
@@ -482,7 +519,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() {
@@ -490,7 +527,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
*/
@@ -499,7 +536,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
*/