Lines Matching refs:message
16 * an AssertionFailedError with the given message.
18 static public void assertTrue(String message, boolean condition) {
20 fail(message);
31 * an AssertionFailedError with the given message.
33 static public void assertFalse(String message, boolean condition) {
34 assertTrue(message, !condition);
44 * Fails a test with the given message.
46 static public void fail(String message) {
47 if (message == null) {
50 throw new AssertionFailedError(message);
53 * Fails a test with no message.
60 * an AssertionFailedError is thrown with the given message.
62 static public void assertEquals(String message, Object expected, Object actual) {
67 failNotEquals(message, expected, actual);
79 static public void assertEquals(String message, String expected, String actual) {
84 String cleanMessage= message == null ? "" : message;
95 * an AssertionFailedError is thrown with the given message. If the expected
98 static public void assertEquals(String message, double expected, double actual, double delta) {
102 failNotEquals(message, new Double(expected), new Double(actual));
113 * are not an AssertionFailedError is thrown with the given message. If the
116 static public void assertEquals(String message, float expected, float actual, float delta) {
120 failNotEquals(message, new Float(expected), new Float(actual));
131 * an AssertionFailedError is thrown with the given message.
133 static public void assertEquals(String message, long expected, long actual) {
134 assertEquals(message, new Long(expected), new Long(actual));
144 * an AssertionFailedError is thrown with the given message.
146 static public void assertEquals(String message, boolean expected, boolean actual) {
147 assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual));
157 * an AssertionFailedError is thrown with the given message.
159 static public void assertEquals(String message, byte expected, byte actual) {
160 assertEquals(message, new Byte(expected), new Byte(actual));
170 * an AssertionFailedError is thrown with the given message.
172 static public void assertEquals(String message, char expected, char actual) {
173 assertEquals(message, new Character(expected), new Character(actual));
183 * an AssertionFailedError is thrown with the given message.
185 static public void assertEquals(String message, short expected, short actual) {
186 assertEquals(message, new Short(expected), new Short(actual));
196 * an AssertionFailedError is thrown with the given message.
198 static public void assertEquals(String message, int expected, int actual) {
199 assertEquals(message, new Integer(expected), new Integer(actual));
215 * an AssertionFailedError is thrown with the given message.
217 static public void assertNotNull(String message, Object object) {
218 assertTrue(message, object != null);
223 * Message contains: Expected: <null> but was: object
229 String message = "Expected: <null> but was: " + String.valueOf(object);
230 assertNull(message, object);
234 * an AssertionFailedError is thrown with the given message.
236 static public void assertNull(String message, Object object) {
237 assertTrue(message, object == null);
241 * an AssertionFailedError is thrown with the given message.
243 static public void assertSame(String message, Object expected, Object actual) {
246 failNotSame(message, expected, actual);
258 * given message.
260 static public void assertNotSame(String message, Object expected, Object actual) {
262 failSame(message);
272 static public void failSame(String message) {
274 if (message != null)
275 formatted= message+" ";
279 static public void failNotSame(String message, Object expected, Object actual) {
281 if (message != null)
282 formatted= message+" ";
286 static public void failNotEquals(String message, Object expected, Object actual) {
287 fail(format(message, expected, actual));
290 public static String format(String message, Object expected, Object actual) {
292 if (message != null && message.length() > 0)
293 formatted= message+" ";