Skip to content

Commit f93a9dc

Browse files
authored
Merge pull request #2650 from tevans78/fixJavaDoc
Fix JavaDoc as code throws AssertionError not AssertionFailedError
2 parents 5432991 + efee2c3 commit f93a9dc

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

testng-asserts/src/main/java/org/testng/Assert.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ public static void assertEquals(byte actual, byte expected) {
878878
}
879879

880880
/**
881-
* Asserts that two chars are equal. If they are not, an AssertionFailedError, with the given
881+
* Asserts that two chars are equal. If they are not, an AssertionError, with the given
882882
* message, is thrown.
883883
*
884884
* @param actual the actual value
@@ -900,7 +900,7 @@ public static void assertEquals(char actual, char expected) {
900900
}
901901

902902
/**
903-
* Asserts that two shorts are equal. If they are not, an AssertionFailedError, with the given
903+
* Asserts that two shorts are equal. If they are not, an AssertionError, with the given
904904
* message, is thrown.
905905
*
906906
* @param actual the actual value
@@ -922,7 +922,7 @@ public static void assertEquals(short actual, short expected) {
922922
}
923923

924924
/**
925-
* Asserts that two ints are equal. If they are not, an AssertionFailedError, with the given
925+
* Asserts that two ints are equal. If they are not, an AssertionError, with the given
926926
* message, is thrown.
927927
*
928928
* @param actual the actual value
@@ -953,7 +953,7 @@ public static void assertNotNull(Object object) {
953953
}
954954

955955
/**
956-
* Asserts that an object isn't null. If it is, an AssertionFailedError, with the given message,
956+
* Asserts that an object isn't null. If it is, an AssertionError, with the given message,
957957
* is thrown.
958958
*
959959
* @param object the assertion object
@@ -980,7 +980,7 @@ public static void assertNull(Object object) {
980980
}
981981

982982
/**
983-
* Asserts that an object is null. If it is not, an AssertionFailedError, with the given message,
983+
* Asserts that an object is null. If it is not, an AssertionError, with the given message,
984984
* is thrown.
985985
*
986986
* @param object the assertion object
@@ -993,7 +993,7 @@ public static void assertNull(Object object, String message) {
993993
}
994994

995995
/**
996-
* Asserts that two objects refer to the same object. If they do not, an AssertionFailedError,
996+
* Asserts that two objects refer to the same object. If they do not, an AssertionError,
997997
* with the given message, is thrown.
998998
*
999999
* @param actual the actual value

testng-core/src/main/java/org/testng/AssertJUnit.java

+20-20
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class AssertJUnit extends ArrayAsserts {
1212
protected AssertJUnit() {}
1313

1414
/**
15-
* Asserts that a condition is true. If it isn't it throws an AssertionFailedError with the given
15+
* Asserts that a condition is true. If it isn't it throws an AssertionError with the given
1616
* message.
1717
*
1818
* @param message The message
@@ -25,7 +25,7 @@ public static void assertTrue(String message, boolean condition) {
2525
}
2626

2727
/**
28-
* Asserts that a condition is true. If it isn't it throws an AssertionFailedError.
28+
* Asserts that a condition is true. If it isn't it throws an AssertionError.
2929
*
3030
* @param condition The actual condition
3131
*/
@@ -34,7 +34,7 @@ public static void assertTrue(boolean condition) {
3434
}
3535

3636
/**
37-
* Asserts that a condition is false. If it isn't it throws an AssertionFailedError with the given
37+
* Asserts that a condition is false. If it isn't it throws an AssertionError with the given
3838
* message.
3939
*
4040
* @param message The message
@@ -45,7 +45,7 @@ public static void assertFalse(String message, boolean condition) {
4545
}
4646

4747
/**
48-
* Asserts that a condition is false. If it isn't it throws an AssertionFailedError.
48+
* Asserts that a condition is false. If it isn't it throws an AssertionError.
4949
*
5050
* @param condition The actual condition
5151
*/
@@ -71,7 +71,7 @@ public static void fail() {
7171
}
7272

7373
/**
74-
* Asserts that two objects are equal. If they are not an AssertionFailedError is thrown with the
74+
* Asserts that two objects are equal. If they are not an AssertionError is thrown with the
7575
* given message.
7676
*
7777
* @param message The message
@@ -89,7 +89,7 @@ public static void assertEquals(String message, Object expected, Object actual)
8989
}
9090

9191
/**
92-
* Asserts that two objects are equal. If they are not an AssertionFailedError is thrown.
92+
* Asserts that two objects are equal. If they are not an AssertionError is thrown.
9393
*
9494
* @param expected The expected value
9595
* @param actual The actual value
@@ -126,7 +126,7 @@ public static void assertEquals(String expected, String actual) {
126126
}
127127

128128
/**
129-
* Asserts that two doubles are equal concerning a delta. If they are not an AssertionFailedError
129+
* Asserts that two doubles are equal concerning a delta. If they are not an AssertionError
130130
* is thrown with the given message. If the expected value is infinity then the delta value is
131131
* ignored.
132132
*
@@ -162,7 +162,7 @@ public static void assertEquals(double expected, double actual, double delta) {
162162
}
163163

164164
/**
165-
* Asserts that two floats are equal concerning a delta. If they are not an AssertionFailedError
165+
* Asserts that two floats are equal concerning a delta. If they are not an AssertionError
166166
* is thrown with the given message. If the expected value is infinity then the delta value is
167167
* ignored.
168168
*
@@ -197,7 +197,7 @@ public static void assertEquals(float expected, float actual, float delta) {
197197
}
198198

199199
/**
200-
* Asserts that two longs are equal. If they are not an AssertionFailedError is thrown with the
200+
* Asserts that two longs are equal. If they are not an AssertionError is thrown with the
201201
* given message.
202202
*
203203
* @param message The message
@@ -219,7 +219,7 @@ public static void assertEquals(long expected, long actual) {
219219
}
220220

221221
/**
222-
* Asserts that two booleans are equal. If they are not an AssertionFailedError is thrown with the
222+
* Asserts that two booleans are equal. If they are not an AssertionError is thrown with the
223223
* given message.
224224
*
225225
* @param message The message
@@ -241,7 +241,7 @@ public static void assertEquals(boolean expected, boolean actual) {
241241
}
242242

243243
/**
244-
* Asserts that two bytes are equal. If they are not an AssertionFailedError is thrown with the
244+
* Asserts that two bytes are equal. If they are not an AssertionError is thrown with the
245245
* given message.
246246
*
247247
* @param message The message
@@ -263,7 +263,7 @@ public static void assertEquals(byte expected, byte actual) {
263263
}
264264

265265
/**
266-
* Asserts that two chars are equal. If they are not an AssertionFailedError is thrown with the
266+
* Asserts that two chars are equal. If they are not an AssertionError is thrown with the
267267
* given message.
268268
*
269269
* @param message The message
@@ -285,7 +285,7 @@ public static void assertEquals(char expected, char actual) {
285285
}
286286

287287
/**
288-
* Asserts that two shorts are equal. If they are not an AssertionFailedError is thrown with the
288+
* Asserts that two shorts are equal. If they are not an AssertionError is thrown with the
289289
* given message.
290290
*
291291
* @param message The message
@@ -307,7 +307,7 @@ public static void assertEquals(short expected, short actual) {
307307
}
308308

309309
/**
310-
* Asserts that two ints are equal. If they are not an AssertionFailedError is thrown with the
310+
* Asserts that two ints are equal. If they are not an AssertionError is thrown with the
311311
* given message.
312312
*
313313
* @param message The message
@@ -338,7 +338,7 @@ public static void assertNotNull(Object object) {
338338
}
339339

340340
/**
341-
* Asserts that an object isn't null. If it is an AssertionFailedError is thrown with the given
341+
* Asserts that an object isn't null. If it is an AssertionError is thrown with the given
342342
* message.
343343
*
344344
* @param message The message
@@ -358,7 +358,7 @@ public static void assertNull(Object object) {
358358
}
359359

360360
/**
361-
* Asserts that an object is null. If it is not an AssertionFailedError is thrown with the given
361+
* Asserts that an object is null. If it is not an AssertionError is thrown with the given
362362
* message.
363363
*
364364
* @param message The message
@@ -369,7 +369,7 @@ public static void assertNull(String message, Object object) {
369369
}
370370

371371
/**
372-
* Asserts that two objects refer to the same object. If they are not an AssertionFailedError is
372+
* Asserts that two objects refer to the same object. If they are not an AssertionError is
373373
* thrown with the given message.
374374
*
375375
* @param message The message
@@ -385,7 +385,7 @@ public static void assertSame(String message, Object expected, Object actual) {
385385

386386
/**
387387
* Asserts that two objects refer to the same object. If they are not the same an
388-
* AssertionFailedError is thrown.
388+
* AssertionError is thrown.
389389
*
390390
* @param expected The expected value
391391
* @param actual The actual value
@@ -395,7 +395,7 @@ public static void assertSame(Object expected, Object actual) {
395395
}
396396

397397
/**
398-
* Asserts that two objects refer to the same object. If they are not an AssertionFailedError is
398+
* Asserts that two objects refer to the same object. If they are not an AssertionError is
399399
* thrown with the given message.
400400
*
401401
* @param message The message
@@ -410,7 +410,7 @@ public static void assertNotSame(String message, Object expected, Object actual)
410410

411411
/**
412412
* Asserts that two objects refer to the same object. If they are not the same an
413-
* AssertionFailedError is thrown.
413+
* AssertionError is thrown.
414414
*
415415
* @param expected The expected value
416416
* @param actual The actual value

0 commit comments

Comments
 (0)