How to use usingRecursiveComparison method of org.assertj.core.api.AbstractObjectArrayAssert class

Best Assertj code snippet using org.assertj.core.api.AbstractObjectArrayAssert.usingRecursiveComparison

Source:AssertJAssertions.java Github

copy

Full Screen

...1183 public AbstractIterableAssert usingComparatorForType(java.util.Comparator p0, Class p1) { return (AbstractIterableAssert) (Object) null; }1184 public AbstractIterableAssert usingFieldByFieldElementComparator() { return (AbstractIterableAssert) (Object) null; }1185 public AbstractIterableAssert usingRecursiveFieldByFieldElementComparator() { return (AbstractIterableAssert) (Object) null; }1186 public AbstractIterableAssert usingRecursiveFieldByFieldElementComparator(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (AbstractIterableAssert) (Object) null; }1187 public RecursiveComparisonAssert usingRecursiveComparison() { return (RecursiveComparisonAssert) (Object) null; }1188 public RecursiveComparisonAssert usingRecursiveComparison(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (RecursiveComparisonAssert) (Object) null; }1189 public AbstractIterableAssert usingElementComparatorOnFields(String[] p0) { return (AbstractIterableAssert) (Object) null; }1190 public AbstractIterableAssert usingElementComparatorIgnoringFields(String[] p0) { return (AbstractIterableAssert) (Object) null; }1191 public AbstractIterableAssert inHexadecimal() { return (AbstractIterableAssert) (Object) null; }1192 public AbstractIterableAssert inBinary() { return (AbstractIterableAssert) (Object) null; }1193 public AbstractIterableAssert filteredOn(String p0, Object p1) { return (AbstractIterableAssert) (Object) null; }1194 public AbstractIterableAssert filteredOnNull(String p0) { return (AbstractIterableAssert) (Object) null; }1195 public AbstractIterableAssert filteredOn(String p0, org.assertj.core.api.filter.FilterOperator p1) { return (AbstractIterableAssert) (Object) null; }1196 public AbstractIterableAssert filteredOn(Condition p0) { return (AbstractIterableAssert) (Object) null; }1197 public AbstractIterableAssert filteredOn(java.util.function.Function p0, Object p1) { return (AbstractIterableAssert) (Object) null; }1198 public AbstractIterableAssert filteredOnAssertions(java.util.function.Consumer p0) { return (AbstractIterableAssert) (Object) null; }1199 public AbstractAssert first() { return (AbstractAssert) (Object) null; }1200 public AbstractAssert first(InstanceOfAssertFactory p0) { return (AbstractAssert) (Object) null; }1201 public AbstractAssert last() { return (AbstractAssert) (Object) null; }1202 public AbstractAssert last(InstanceOfAssertFactory p0) { return (AbstractAssert) (Object) null; }1203 public AbstractAssert element(int p0) { return (AbstractAssert) (Object) null; }1204 public AbstractAssert element(int p0, InstanceOfAssertFactory p1) { return (AbstractAssert) (Object) null; }1205 public AbstractAssert singleElement() { return (AbstractAssert) (Object) null; }1206 public AbstractAssert singleElement(InstanceOfAssertFactory p0) { return (AbstractAssert) (Object) null; }1207 public AbstractIterableAssert filteredOn(java.util.function.Predicate p0) { return (AbstractIterableAssert) (Object) null; }1208 public AbstractIterableAssert allMatch(java.util.function.Predicate p0) { return (AbstractIterableAssert) (Object) null; }1209 public AbstractIterableAssert allMatch(java.util.function.Predicate p0, String p1) { return (AbstractIterableAssert) (Object) null; }1210 public AbstractIterableAssert allSatisfy(java.util.function.Consumer p0) { return (AbstractIterableAssert) (Object) null; }1211 public AbstractIterableAssert anyMatch(java.util.function.Predicate p0) { return (AbstractIterableAssert) (Object) null; }1212 public AbstractIterableAssert zipSatisfy(Iterable p0, java.util.function.BiConsumer p1) { return (AbstractIterableAssert) (Object) null; }1213 public AbstractIterableAssert anySatisfy(java.util.function.Consumer p0) { return (AbstractIterableAssert) (Object) null; }1214 public AbstractIterableAssert noneSatisfy(java.util.function.Consumer p0) { return (AbstractIterableAssert) (Object) null; }1215 public AbstractIterableAssert satisfiesExactly(java.util.function.Consumer[] p0) { return (AbstractIterableAssert) (Object) null; }1216 public AbstractIterableAssert satisfiesExactlyInAnyOrder(java.util.function.Consumer[] p0) { return (AbstractIterableAssert) (Object) null; }1217 public AbstractIterableAssert as(String p0, Object[] p1) { return (AbstractIterableAssert) (Object) null; }1218 public AbstractIterableAssert as(org.assertj.core.description.Description p0) { return (AbstractIterableAssert) (Object) null; }1219 public AbstractIterableAssert describedAs(org.assertj.core.description.Description p0) { return (AbstractIterableAssert) (Object) null; }1220 public AbstractIterableAssert describedAs(String p0, Object[] p1) { return (AbstractIterableAssert) (Object) null; }1221 public AbstractIterableAssert doesNotHave(Condition p0) { return (AbstractIterableAssert) (Object) null; }1222 public AbstractIterableAssert doesNotHaveSameClassAs(Object p0) { return (AbstractIterableAssert) (Object) null; }1223 public AbstractIterableAssert has(Condition p0) { return (AbstractIterableAssert) (Object) null; }1224 public AbstractIterableAssert hasSameClassAs(Object p0) { return (AbstractIterableAssert) (Object) null; }1225 public AbstractIterableAssert hasToString(String p0) { return (AbstractIterableAssert) (Object) null; }1226 public AbstractIterableAssert is(Condition p0) { return (AbstractIterableAssert) (Object) null; }1227 public AbstractIterableAssert isEqualTo(Object p0) { return (AbstractIterableAssert) (Object) null; }1228 public AbstractIterableAssert isExactlyInstanceOf(Class p0) { return (AbstractIterableAssert) (Object) null; }1229 public AbstractIterableAssert isIn(Iterable p0) { return (AbstractIterableAssert) (Object) null; }1230 public AbstractIterableAssert isIn(Object[] p0) { return (AbstractIterableAssert) (Object) null; }1231 public AbstractIterableAssert isInstanceOf(Class p0) { return (AbstractIterableAssert) (Object) null; }1232 public AbstractIterableAssert isInstanceOfAny(Class[] p0) { return (AbstractIterableAssert) (Object) null; }1233 public AbstractIterableAssert isNot(Condition p0) { return (AbstractIterableAssert) (Object) null; }1234 public AbstractIterableAssert isNotEqualTo(Object p0) { return (AbstractIterableAssert) (Object) null; }1235 public AbstractIterableAssert isNotExactlyInstanceOf(Class p0) { return (AbstractIterableAssert) (Object) null; }1236 public AbstractIterableAssert isNotIn(Iterable p0) { return (AbstractIterableAssert) (Object) null; }1237 public AbstractIterableAssert isNotIn(Object[] p0) { return (AbstractIterableAssert) (Object) null; }1238 public AbstractIterableAssert isNotInstanceOf(Class p0) { return (AbstractIterableAssert) (Object) null; }1239 public AbstractIterableAssert isNotInstanceOfAny(Class[] p0) { return (AbstractIterableAssert) (Object) null; }1240 public AbstractIterableAssert isNotOfAnyClassIn(Class[] p0) { return (AbstractIterableAssert) (Object) null; }1241 public AbstractIterableAssert isNotNull() { return (AbstractIterableAssert) (Object) null; }1242 public AbstractIterableAssert isNotSameAs(Object p0) { return (AbstractIterableAssert) (Object) null; }1243 public AbstractIterableAssert isOfAnyClassIn(Class[] p0) { return (AbstractIterableAssert) (Object) null; }1244 public AbstractIterableAssert isSameAs(Object p0) { return (AbstractIterableAssert) (Object) null; }1245 public AbstractIterableAssert noneMatch(java.util.function.Predicate p0) { return (AbstractIterableAssert) (Object) null; }1246 public AbstractIterableAssert overridingErrorMessage(String p0, Object[] p1) { return (AbstractIterableAssert) (Object) null; }1247 public AbstractIterableAssert usingDefaultComparator() { return (AbstractIterableAssert) (Object) null; }1248 public AbstractIterableAssert usingComparator(java.util.Comparator p0) { return (AbstractIterableAssert) (Object) null; }1249 public AbstractIterableAssert usingComparator(java.util.Comparator p0, String p1) { return (AbstractIterableAssert) (Object) null; }1250 public AbstractIterableAssert withFailMessage(String p0, Object[] p1) { return (AbstractIterableAssert) (Object) null; }1251 public AbstractIterableAssert withThreadDumpOnError() { return (AbstractIterableAssert) (Object) null; }1252 public AbstractIterableSizeAssert size() { return (AbstractIterableSizeAssert) (Object) null; }1253}1254---1255package org.assertj.core.api;1256import java.io.*;1257public abstract class AbstractIterableSizeAssert extends AbstractIntegerAssert {1258 public abstract AbstractIterableAssert returnToIterable();1259}1260---1261package org.assertj.core.api;1262import java.io.*;1263public abstract class AbstractIteratorAssert extends AbstractAssert {1264 public AbstractIteratorAssert hasNext() { return (AbstractIteratorAssert) (Object) null; }1265 public AbstractIteratorAssert isExhausted() { return (AbstractIteratorAssert) (Object) null; }1266 public IterableAssert toIterable() { return (IterableAssert) (Object) null; }1267}1268---1269package org.assertj.core.api;1270import java.io.*;1271public abstract class AbstractListAssert extends AbstractIterableAssert implements IndexedObjectEnumerableAssert {1272 public AbstractListAssert contains(Object p0, org.assertj.core.data.Index p1) { return (AbstractListAssert) (Object) null; }1273 public AbstractListAssert doesNotContain(Object p0, org.assertj.core.data.Index p1) { return (AbstractListAssert) (Object) null; }1274 public AbstractListAssert has(Condition p0, org.assertj.core.data.Index p1) { return (AbstractListAssert) (Object) null; }1275 public AbstractListAssert is(Condition p0, org.assertj.core.data.Index p1) { return (AbstractListAssert) (Object) null; }1276 public AbstractListAssert isSorted() { return (AbstractListAssert) (Object) null; }1277 public AbstractListAssert isSortedAccordingTo(java.util.Comparator p0) { return (AbstractListAssert) (Object) null; }1278 public AbstractListAssert satisfies(java.util.function.Consumer p0, org.assertj.core.data.Index p1) { return (AbstractListAssert) (Object) null; }1279 public AbstractListAssert usingElementComparator(java.util.Comparator p0) { return (AbstractListAssert) (Object) null; }1280 public AbstractListAssert usingDefaultElementComparator() { return (AbstractListAssert) (Object) null; }1281 public AbstractListAssert as(String p0, Object[] p1) { return (AbstractListAssert) (Object) null; }1282 public AbstractListAssert as(org.assertj.core.description.Description p0) { return (AbstractListAssert) (Object) null; }1283 public AbstractListAssert describedAs(org.assertj.core.description.Description p0) { return (AbstractListAssert) (Object) null; }1284 public AbstractListAssert describedAs(String p0, Object[] p1) { return (AbstractListAssert) (Object) null; }1285 public AbstractListAssert doesNotHave(Condition p0) { return (AbstractListAssert) (Object) null; }1286 public AbstractListAssert doesNotHaveSameClassAs(Object p0) { return (AbstractListAssert) (Object) null; }1287 public AbstractListAssert has(Condition p0) { return (AbstractListAssert) (Object) null; }1288 public AbstractListAssert hasSameClassAs(Object p0) { return (AbstractListAssert) (Object) null; }1289 public AbstractListAssert hasToString(String p0) { return (AbstractListAssert) (Object) null; }1290 public AbstractListAssert is(Condition p0) { return (AbstractListAssert) (Object) null; }1291 public AbstractListAssert isEqualTo(Object p0) { return (AbstractListAssert) (Object) null; }1292 public AbstractListAssert isExactlyInstanceOf(Class p0) { return (AbstractListAssert) (Object) null; }1293 public AbstractListAssert isIn(Iterable p0) { return (AbstractListAssert) (Object) null; }1294 public AbstractListAssert isIn(Object[] p0) { return (AbstractListAssert) (Object) null; }1295 public AbstractListAssert isInstanceOf(Class p0) { return (AbstractListAssert) (Object) null; }1296 public AbstractListAssert isInstanceOfAny(Class[] p0) { return (AbstractListAssert) (Object) null; }1297 public AbstractListAssert isNot(Condition p0) { return (AbstractListAssert) (Object) null; }1298 public AbstractListAssert isNotEqualTo(Object p0) { return (AbstractListAssert) (Object) null; }1299 public AbstractListAssert isNotExactlyInstanceOf(Class p0) { return (AbstractListAssert) (Object) null; }1300 public AbstractListAssert isNotIn(Iterable p0) { return (AbstractListAssert) (Object) null; }1301 public AbstractListAssert isNotIn(Object[] p0) { return (AbstractListAssert) (Object) null; }1302 public AbstractListAssert isNotInstanceOf(Class p0) { return (AbstractListAssert) (Object) null; }1303 public AbstractListAssert isNotInstanceOfAny(Class[] p0) { return (AbstractListAssert) (Object) null; }1304 public AbstractListAssert isNotOfAnyClassIn(Class[] p0) { return (AbstractListAssert) (Object) null; }1305 public AbstractListAssert isNotNull() { return (AbstractListAssert) (Object) null; }1306 public AbstractListAssert isNotSameAs(Object p0) { return (AbstractListAssert) (Object) null; }1307 public AbstractListAssert isOfAnyClassIn(Class[] p0) { return (AbstractListAssert) (Object) null; }1308 public AbstractListAssert isSameAs(Object p0) { return (AbstractListAssert) (Object) null; }1309 public AbstractListAssert overridingErrorMessage(String p0, Object[] p1) { return (AbstractListAssert) (Object) null; }1310 public AbstractListAssert usingDefaultComparator() { return (AbstractListAssert) (Object) null; }1311 public AbstractListAssert usingComparator(java.util.Comparator p0) { return (AbstractListAssert) (Object) null; }1312 public AbstractListAssert usingComparator(java.util.Comparator p0, String p1) { return (AbstractListAssert) (Object) null; }1313 public AbstractListAssert withFailMessage(String p0, Object[] p1) { return (AbstractListAssert) (Object) null; }1314 public AbstractListAssert withThreadDumpOnError() { return (AbstractListAssert) (Object) null; }1315}1316---1317package org.assertj.core.api;1318import java.io.*;1319public abstract class AbstractLocalDateAssert extends AbstractTemporalAssert {1320 public static String NULL_LOCAL_DATE_TIME_PARAMETER_MESSAGE;1321 public AbstractLocalDateAssert isBefore(java.time.LocalDate p0) { return (AbstractLocalDateAssert) (Object) null; }1322 public AbstractLocalDateAssert isBefore(String p0) { return (AbstractLocalDateAssert) (Object) null; }1323 public AbstractLocalDateAssert isBeforeOrEqualTo(java.time.LocalDate p0) { return (AbstractLocalDateAssert) (Object) null; }1324 public AbstractLocalDateAssert isBeforeOrEqualTo(String p0) { return (AbstractLocalDateAssert) (Object) null; }1325 public AbstractLocalDateAssert isAfterOrEqualTo(java.time.LocalDate p0) { return (AbstractLocalDateAssert) (Object) null; }1326 public AbstractLocalDateAssert isAfterOrEqualTo(String p0) { return (AbstractLocalDateAssert) (Object) null; }1327 public AbstractLocalDateAssert isAfter(java.time.LocalDate p0) { return (AbstractLocalDateAssert) (Object) null; }1328 public AbstractLocalDateAssert isAfter(String p0) { return (AbstractLocalDateAssert) (Object) null; }1329 public AbstractLocalDateAssert isEqualTo(String p0) { return (AbstractLocalDateAssert) (Object) null; }1330 public AbstractLocalDateAssert isNotEqualTo(String p0) { return (AbstractLocalDateAssert) (Object) null; }1331 public AbstractLocalDateAssert isIn(String[] p0) { return (AbstractLocalDateAssert) (Object) null; }1332 public AbstractLocalDateAssert isNotIn(String[] p0) { return (AbstractLocalDateAssert) (Object) null; }1333 public AbstractLocalDateAssert isToday() { return (AbstractLocalDateAssert) (Object) null; }1334 public AbstractLocalDateAssert isBetween(java.time.LocalDate p0, java.time.LocalDate p1) { return (AbstractLocalDateAssert) (Object) null; }1335 public AbstractLocalDateAssert isBetween(String p0, String p1) { return (AbstractLocalDateAssert) (Object) null; }1336 public AbstractLocalDateAssert isStrictlyBetween(java.time.LocalDate p0, java.time.LocalDate p1) { return (AbstractLocalDateAssert) (Object) null; }1337 public AbstractLocalDateAssert isStrictlyBetween(String p0, String p1) { return (AbstractLocalDateAssert) (Object) null; }1338}1339---1340package org.assertj.core.api;1341import java.io.*;1342public abstract class AbstractLocalDateTimeAssert extends AbstractTemporalAssert {1343 public static String NULL_LOCAL_DATE_TIME_PARAMETER_MESSAGE;1344 public AbstractLocalDateTimeAssert isBefore(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1345 public AbstractLocalDateTimeAssert isBefore(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1346 public AbstractLocalDateTimeAssert isBeforeOrEqualTo(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1347 public AbstractLocalDateTimeAssert isBeforeOrEqualTo(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1348 public AbstractLocalDateTimeAssert isAfterOrEqualTo(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1349 public AbstractLocalDateTimeAssert isAfterOrEqualTo(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1350 public AbstractLocalDateTimeAssert isAfter(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1351 public AbstractLocalDateTimeAssert isAfter(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1352 public AbstractLocalDateTimeAssert isEqualTo(Object p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1353 public AbstractLocalDateTimeAssert isEqualTo(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1354 public AbstractLocalDateTimeAssert isNotEqualTo(Object p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1355 public AbstractLocalDateTimeAssert isNotEqualTo(String p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1356 public AbstractLocalDateTimeAssert isIn(String[] p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1357 public AbstractLocalDateTimeAssert isNotIn(String[] p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1358 public AbstractLocalDateTimeAssert isCloseToUtcNow(org.assertj.core.data.TemporalUnitOffset p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1359 public AbstractLocalDateTimeAssert usingDefaultComparator() { return (AbstractLocalDateTimeAssert) (Object) null; }1360 public AbstractLocalDateTimeAssert isEqualToIgnoringNanos(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1361 public AbstractLocalDateTimeAssert isEqualToIgnoringSeconds(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1362 public AbstractLocalDateTimeAssert isEqualToIgnoringMinutes(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1363 public AbstractLocalDateTimeAssert isEqualToIgnoringHours(java.time.LocalDateTime p0) { return (AbstractLocalDateTimeAssert) (Object) null; }1364 public AbstractLocalDateTimeAssert isBetween(java.time.LocalDateTime p0, java.time.LocalDateTime p1) { return (AbstractLocalDateTimeAssert) (Object) null; }1365 public AbstractLocalDateTimeAssert isBetween(String p0, String p1) { return (AbstractLocalDateTimeAssert) (Object) null; }1366 public AbstractLocalDateTimeAssert isStrictlyBetween(java.time.LocalDateTime p0, java.time.LocalDateTime p1) { return (AbstractLocalDateTimeAssert) (Object) null; }1367 public AbstractLocalDateTimeAssert isStrictlyBetween(String p0, String p1) { return (AbstractLocalDateTimeAssert) (Object) null; }1368}1369---1370package org.assertj.core.api;1371import java.io.*;1372public abstract class AbstractLocalTimeAssert extends AbstractTemporalAssert {1373 public static String NULL_LOCAL_TIME_PARAMETER_MESSAGE;1374 public AbstractLocalTimeAssert isBefore(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1375 public AbstractLocalTimeAssert isBefore(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1376 public AbstractLocalTimeAssert isBeforeOrEqualTo(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1377 public AbstractLocalTimeAssert isBeforeOrEqualTo(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1378 public AbstractLocalTimeAssert isAfterOrEqualTo(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1379 public AbstractLocalTimeAssert isAfterOrEqualTo(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1380 public AbstractLocalTimeAssert isAfter(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1381 public AbstractLocalTimeAssert isAfter(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1382 public AbstractLocalTimeAssert isEqualTo(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1383 public AbstractLocalTimeAssert isNotEqualTo(String p0) { return (AbstractLocalTimeAssert) (Object) null; }1384 public AbstractLocalTimeAssert isIn(String[] p0) { return (AbstractLocalTimeAssert) (Object) null; }1385 public AbstractLocalTimeAssert isNotIn(String[] p0) { return (AbstractLocalTimeAssert) (Object) null; }1386 public AbstractLocalTimeAssert isEqualToIgnoringNanos(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1387 public AbstractLocalTimeAssert isEqualToIgnoringSeconds(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1388 public AbstractLocalTimeAssert hasSameHourAs(java.time.LocalTime p0) { return (AbstractLocalTimeAssert) (Object) null; }1389 public AbstractLocalTimeAssert isBetween(java.time.LocalTime p0, java.time.LocalTime p1) { return (AbstractLocalTimeAssert) (Object) null; }1390 public AbstractLocalTimeAssert isBetween(String p0, String p1) { return (AbstractLocalTimeAssert) (Object) null; }1391 public AbstractLocalTimeAssert isStrictlyBetween(java.time.LocalTime p0, java.time.LocalTime p1) { return (AbstractLocalTimeAssert) (Object) null; }1392 public AbstractLocalTimeAssert isStrictlyBetween(String p0, String p1) { return (AbstractLocalTimeAssert) (Object) null; }1393}1394---1395package org.assertj.core.api;1396import java.io.*;1397public class AbstractLongAdderAssert extends AbstractAssert implements NumberAssert, ComparableAssert {1398 public AbstractLongAdderAssert hasValue(long p0) { return (AbstractLongAdderAssert) (Object) null; }1399 public AbstractLongAdderAssert doesNotHaveValue(long p0) { return (AbstractLongAdderAssert) (Object) null; }1400 public AbstractLongAdderAssert usingComparator(java.util.Comparator p0) { return (AbstractLongAdderAssert) (Object) null; }1401 public AbstractLongAdderAssert usingComparator(java.util.Comparator p0, String p1) { return (AbstractLongAdderAssert) (Object) null; }1402 public AbstractLongAdderAssert usingDefaultComparator() { return (AbstractLongAdderAssert) (Object) null; }1403 public AbstractLongAdderAssert isZero() { return (AbstractLongAdderAssert) (Object) null; }1404 public AbstractLongAdderAssert isNotZero() { return (AbstractLongAdderAssert) (Object) null; }1405 public AbstractLongAdderAssert isOne() { return (AbstractLongAdderAssert) (Object) null; }1406 public AbstractLongAdderAssert isPositive() { return (AbstractLongAdderAssert) (Object) null; }1407 public AbstractLongAdderAssert isNegative() { return (AbstractLongAdderAssert) (Object) null; }1408 public AbstractLongAdderAssert isNotNegative() { return (AbstractLongAdderAssert) (Object) null; }1409 public AbstractLongAdderAssert isNotPositive() { return (AbstractLongAdderAssert) (Object) null; }1410 public AbstractLongAdderAssert isEqualByComparingTo(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1411 public AbstractLongAdderAssert isNotEqualByComparingTo(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1412 public AbstractLongAdderAssert isLessThan(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1413 public AbstractLongAdderAssert isLessThanOrEqualTo(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1414 public AbstractLongAdderAssert isGreaterThan(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1415 public AbstractLongAdderAssert isGreaterThanOrEqualTo(Long p0) { return (AbstractLongAdderAssert) (Object) null; }1416 public AbstractLongAdderAssert isBetween(Long p0, Long p1) { return (AbstractLongAdderAssert) (Object) null; }1417 public AbstractLongAdderAssert isStrictlyBetween(Long p0, Long p1) { return (AbstractLongAdderAssert) (Object) null; }1418 public AbstractLongAdderAssert isCloseTo(Long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAdderAssert) (Object) null; }1419 public AbstractLongAdderAssert isNotCloseTo(Long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAdderAssert) (Object) null; }1420 public AbstractLongAdderAssert isCloseTo(Long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAdderAssert) (Object) null; }1421 public AbstractLongAdderAssert isNotCloseTo(Long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAdderAssert) (Object) null; }1422 public NumberAssert isNotCloseTo(Number p0, org.assertj.core.data.Percentage p1) { return (NumberAssert) (Object) null; }1423 public NumberAssert isCloseTo(Number p0, org.assertj.core.data.Percentage p1) { return (NumberAssert) (Object) null; }1424 public NumberAssert isNotCloseTo(Number p0, org.assertj.core.data.Offset p1) { return (NumberAssert) (Object) null; }1425 public NumberAssert isCloseTo(Number p0, org.assertj.core.data.Offset p1) { return (NumberAssert) (Object) null; }1426 public NumberAssert isStrictlyBetween(Number p0, Number p1) { return (NumberAssert) (Object) null; }1427 public NumberAssert isBetween(Number p0, Number p1) { return (NumberAssert) (Object) null; }1428 public ComparableAssert isStrictlyBetween(Comparable p0, Comparable p1) { return (ComparableAssert) (Object) null; }1429 public ComparableAssert isBetween(Comparable p0, Comparable p1) { return (ComparableAssert) (Object) null; }1430 public ComparableAssert isGreaterThanOrEqualTo(Comparable p0) { return (ComparableAssert) (Object) null; }1431 public ComparableAssert isGreaterThan(Comparable p0) { return (ComparableAssert) (Object) null; }1432 public ComparableAssert isLessThanOrEqualTo(Comparable p0) { return (ComparableAssert) (Object) null; }1433 public ComparableAssert isLessThan(Comparable p0) { return (ComparableAssert) (Object) null; }1434 public ComparableAssert isNotEqualByComparingTo(Comparable p0) { return (ComparableAssert) (Object) null; }1435 public ComparableAssert isEqualByComparingTo(Comparable p0) { return (ComparableAssert) (Object) null; }1436}1437---1438package org.assertj.core.api;1439import java.io.*;1440public abstract class AbstractLongArrayAssert extends AbstractArrayAssert {1441 public void isNullOrEmpty() {}1442 public void isEmpty() {}1443 public AbstractLongArrayAssert isNotEmpty() { return (AbstractLongArrayAssert) (Object) null; }1444 public AbstractLongArrayAssert hasSize(int p0) { return (AbstractLongArrayAssert) (Object) null; }1445 public AbstractLongArrayAssert hasSizeGreaterThan(int p0) { return (AbstractLongArrayAssert) (Object) null; }1446 public AbstractLongArrayAssert hasSizeGreaterThanOrEqualTo(int p0) { return (AbstractLongArrayAssert) (Object) null; }1447 public AbstractLongArrayAssert hasSizeLessThan(int p0) { return (AbstractLongArrayAssert) (Object) null; }1448 public AbstractLongArrayAssert hasSizeLessThanOrEqualTo(int p0) { return (AbstractLongArrayAssert) (Object) null; }1449 public AbstractLongArrayAssert hasSizeBetween(int p0, int p1) { return (AbstractLongArrayAssert) (Object) null; }1450 public AbstractLongArrayAssert hasSameSizeAs(Iterable p0) { return (AbstractLongArrayAssert) (Object) null; }1451 public AbstractLongArrayAssert contains(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1452 public AbstractLongArrayAssert contains(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1453 public AbstractLongArrayAssert containsOnly(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1454 public AbstractLongArrayAssert containsOnly(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1455 public AbstractLongArrayAssert containsOnlyOnce(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1456 public AbstractLongArrayAssert containsOnlyOnce(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1457 public AbstractLongArrayAssert containsSequence(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1458 public AbstractLongArrayAssert containsSequence(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1459 public AbstractLongArrayAssert containsSubsequence(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1460 public AbstractLongArrayAssert containsSubsequence(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1461 public AbstractLongArrayAssert contains(long p0, org.assertj.core.data.Index p1) { return (AbstractLongArrayAssert) (Object) null; }1462 public AbstractLongArrayAssert doesNotContain(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1463 public AbstractLongArrayAssert doesNotContain(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1464 public AbstractLongArrayAssert doesNotContain(long p0, org.assertj.core.data.Index p1) { return (AbstractLongArrayAssert) (Object) null; }1465 public AbstractLongArrayAssert doesNotHaveDuplicates() { return (AbstractLongArrayAssert) (Object) null; }1466 public AbstractLongArrayAssert startsWith(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1467 public AbstractLongArrayAssert startsWith(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1468 public AbstractLongArrayAssert endsWith(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1469 public AbstractLongArrayAssert endsWith(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1470 public AbstractLongArrayAssert isSorted() { return (AbstractLongArrayAssert) (Object) null; }1471 public AbstractLongArrayAssert isSortedAccordingTo(java.util.Comparator p0) { return (AbstractLongArrayAssert) (Object) null; }1472 public AbstractLongArrayAssert usingElementComparator(java.util.Comparator p0) { return (AbstractLongArrayAssert) (Object) null; }1473 public AbstractLongArrayAssert usingDefaultElementComparator() { return (AbstractLongArrayAssert) (Object) null; }1474 public AbstractLongArrayAssert containsExactly(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1475 public AbstractLongArrayAssert containsExactly(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1476 public AbstractLongArrayAssert containsExactlyInAnyOrder(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1477 public AbstractLongArrayAssert containsExactlyInAnyOrder(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1478 public AbstractLongArrayAssert containsAnyOf(long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1479 public AbstractLongArrayAssert containsAnyOf(Long[] p0) { return (AbstractLongArrayAssert) (Object) null; }1480}1481---1482package org.assertj.core.api;1483import java.io.*;1484public abstract class AbstractLongAssert extends AbstractComparableAssert implements NumberAssert {1485 public AbstractLongAssert isEqualTo(long p0) { return (AbstractLongAssert) (Object) null; }1486 public AbstractLongAssert isNotEqualTo(long p0) { return (AbstractLongAssert) (Object) null; }1487 public AbstractLongAssert isZero() { return (AbstractLongAssert) (Object) null; }1488 public AbstractLongAssert isNotZero() { return (AbstractLongAssert) (Object) null; }1489 public AbstractLongAssert isOne() { return (AbstractLongAssert) (Object) null; }1490 public AbstractLongAssert isPositive() { return (AbstractLongAssert) (Object) null; }1491 public AbstractLongAssert isNegative() { return (AbstractLongAssert) (Object) null; }1492 public AbstractLongAssert isNotNegative() { return (AbstractLongAssert) (Object) null; }1493 public AbstractLongAssert isNotPositive() { return (AbstractLongAssert) (Object) null; }1494 public AbstractLongAssert isEven() { return (AbstractLongAssert) (Object) null; }1495 public AbstractLongAssert isOdd() { return (AbstractLongAssert) (Object) null; }1496 public AbstractLongAssert isLessThan(long p0) { return (AbstractLongAssert) (Object) null; }1497 public AbstractLongAssert isLessThanOrEqualTo(long p0) { return (AbstractLongAssert) (Object) null; }1498 public AbstractLongAssert isGreaterThan(long p0) { return (AbstractLongAssert) (Object) null; }1499 public AbstractLongAssert isGreaterThanOrEqualTo(long p0) { return (AbstractLongAssert) (Object) null; }1500 public AbstractLongAssert isBetween(Long p0, Long p1) { return (AbstractLongAssert) (Object) null; }1501 public AbstractLongAssert isStrictlyBetween(Long p0, Long p1) { return (AbstractLongAssert) (Object) null; }1502 public AbstractLongAssert isCloseTo(long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAssert) (Object) null; }1503 public AbstractLongAssert isNotCloseTo(long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAssert) (Object) null; }1504 public AbstractLongAssert isCloseTo(Long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAssert) (Object) null; }1505 public AbstractLongAssert isNotCloseTo(Long p0, org.assertj.core.data.Offset p1) { return (AbstractLongAssert) (Object) null; }1506 public AbstractLongAssert isCloseTo(Long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAssert) (Object) null; }1507 public AbstractLongAssert isNotCloseTo(Long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAssert) (Object) null; }1508 public AbstractLongAssert isCloseTo(long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAssert) (Object) null; }1509 public AbstractLongAssert isNotCloseTo(long p0, org.assertj.core.data.Percentage p1) { return (AbstractLongAssert) (Object) null; }1510 public AbstractLongAssert usingComparator(java.util.Comparator p0) { return (AbstractLongAssert) (Object) null; }1511 public AbstractLongAssert usingComparator(java.util.Comparator p0, String p1) { return (AbstractLongAssert) (Object) null; }1512 public AbstractLongAssert usingDefaultComparator() { return (AbstractLongAssert) (Object) null; }1513 public AbstractComparableAssert isStrictlyBetween(Comparable p0, Comparable p1) { return (AbstractComparableAssert) (Object) null; }1514 public AbstractComparableAssert isBetween(Comparable p0, Comparable p1) { return (AbstractComparableAssert) (Object) null; }1515 public NumberAssert isNotCloseTo(Number p0, org.assertj.core.data.Percentage p1) { return (NumberAssert) (Object) null; }1516 public NumberAssert isCloseTo(Number p0, org.assertj.core.data.Percentage p1) { return (NumberAssert) (Object) null; }1517 public NumberAssert isNotCloseTo(Number p0, org.assertj.core.data.Offset p1) { return (NumberAssert) (Object) null; }1518 public NumberAssert isCloseTo(Number p0, org.assertj.core.data.Offset p1) { return (NumberAssert) (Object) null; }1519 public NumberAssert isStrictlyBetween(Number p0, Number p1) { return (NumberAssert) (Object) null; }1520 public NumberAssert isBetween(Number p0, Number p1) { return (NumberAssert) (Object) null; }1521}1522---1523package org.assertj.core.api;1524import java.io.*;1525public abstract class AbstractMapAssert extends AbstractObjectAssert implements EnumerableAssert {1526 public AbstractMapAssert allSatisfy(java.util.function.BiConsumer p0) { return (AbstractMapAssert) (Object) null; }1527 public AbstractMapAssert anySatisfy(java.util.function.BiConsumer p0) { return (AbstractMapAssert) (Object) null; }1528 public AbstractMapAssert noneSatisfy(java.util.function.BiConsumer p0) { return (AbstractMapAssert) (Object) null; }1529 public void isNullOrEmpty() {}1530 public void isEmpty() {}1531 public AbstractMapAssert isNotEmpty() { return (AbstractMapAssert) (Object) null; }1532 public AbstractMapAssert hasSize(int p0) { return (AbstractMapAssert) (Object) null; }1533 public AbstractMapAssert hasSizeGreaterThan(int p0) { return (AbstractMapAssert) (Object) null; }1534 public AbstractMapAssert hasSizeGreaterThanOrEqualTo(int p0) { return (AbstractMapAssert) (Object) null; }1535 public AbstractMapAssert hasSizeLessThan(int p0) { return (AbstractMapAssert) (Object) null; }1536 public AbstractMapAssert hasSizeLessThanOrEqualTo(int p0) { return (AbstractMapAssert) (Object) null; }1537 public AbstractMapAssert hasSizeBetween(int p0, int p1) { return (AbstractMapAssert) (Object) null; }1538 public AbstractMapAssert hasSameSizeAs(Object p0) { return (AbstractMapAssert) (Object) null; }1539 public AbstractMapAssert hasSameSizeAs(Iterable p0) { return (AbstractMapAssert) (Object) null; }1540 public AbstractMapAssert hasSameSizeAs(java.util.Map p0) { return (AbstractMapAssert) (Object) null; }1541 public AbstractMapAssert contains(java.util.Map.Entry[] p0) { return (AbstractMapAssert) (Object) null; }1542 public AbstractMapAssert containsAnyOf(java.util.Map.Entry[] p0) { return (AbstractMapAssert) (Object) null; }1543 public AbstractMapAssert containsAllEntriesOf(java.util.Map p0) { return (AbstractMapAssert) (Object) null; }1544 public AbstractMapAssert containsExactlyEntriesOf(java.util.Map p0) { return (AbstractMapAssert) (Object) null; }1545 public AbstractMapAssert containsExactlyInAnyOrderEntriesOf(java.util.Map p0) { return (AbstractMapAssert) (Object) null; }1546 public AbstractMapAssert containsEntry(Object p0, Object p1) { return (AbstractMapAssert) (Object) null; }1547 public AbstractMapAssert hasEntrySatisfying(Object p0, Condition p1) { return (AbstractMapAssert) (Object) null; }1548 public AbstractMapAssert hasEntrySatisfying(Object p0, java.util.function.Consumer p1) { return (AbstractMapAssert) (Object) null; }1549 public AbstractMapAssert hasEntrySatisfying(Condition p0) { return (AbstractMapAssert) (Object) null; }1550 public AbstractMapAssert hasEntrySatisfying(Condition p0, Condition p1) { return (AbstractMapAssert) (Object) null; }1551 public AbstractMapAssert hasKeySatisfying(Condition p0) { return (AbstractMapAssert) (Object) null; }1552 public AbstractMapAssert hasValueSatisfying(Condition p0) { return (AbstractMapAssert) (Object) null; }1553 public AbstractMapAssert doesNotContain(java.util.Map.Entry[] p0) { return (AbstractMapAssert) (Object) null; }1554 public AbstractMapAssert doesNotContainEntry(Object p0, Object p1) { return (AbstractMapAssert) (Object) null; }1555 public AbstractMapAssert containsKey(Object p0) { return (AbstractMapAssert) (Object) null; }1556 public AbstractMapAssert containsKeys(Object[] p0) { return (AbstractMapAssert) (Object) null; }1557 public AbstractMapAssert doesNotContainKey(Object p0) { return (AbstractMapAssert) (Object) null; }1558 public AbstractMapAssert doesNotContainKeys(Object[] p0) { return (AbstractMapAssert) (Object) null; }1559 public AbstractMapAssert containsOnlyKeys(Object[] p0) { return (AbstractMapAssert) (Object) null; }1560 public AbstractMapAssert containsOnlyKeys(Iterable p0) { return (AbstractMapAssert) (Object) null; }1561 public AbstractMapAssert containsValue(Object p0) { return (AbstractMapAssert) (Object) null; }1562 public AbstractMapAssert containsValues(Object[] p0) { return (AbstractMapAssert) (Object) null; }1563 public AbstractMapAssert doesNotContainValue(Object p0) { return (AbstractMapAssert) (Object) null; }1564 public AbstractMapAssert containsOnly(java.util.Map.Entry[] p0) { return (AbstractMapAssert) (Object) null; }1565 public AbstractMapAssert containsExactly(java.util.Map.Entry[] p0) { return (AbstractMapAssert) (Object) null; }1566 public AbstractMapAssert usingElementComparator(java.util.Comparator p0) { return (AbstractMapAssert) (Object) null; }1567 public AbstractMapAssert usingDefaultElementComparator() { return (AbstractMapAssert) (Object) null; }1568 public AbstractMapAssert as(String p0, Object[] p1) { return (AbstractMapAssert) (Object) null; }1569 public AbstractMapAssert as(org.assertj.core.description.Description p0) { return (AbstractMapAssert) (Object) null; }1570 public AbstractMapAssert describedAs(org.assertj.core.description.Description p0) { return (AbstractMapAssert) (Object) null; }1571 public AbstractMapAssert describedAs(String p0, Object[] p1) { return (AbstractMapAssert) (Object) null; }1572 public AbstractMapAssert doesNotHave(Condition p0) { return (AbstractMapAssert) (Object) null; }1573 public AbstractMapAssert doesNotHaveSameClassAs(Object p0) { return (AbstractMapAssert) (Object) null; }1574 public AbstractMapAssert has(Condition p0) { return (AbstractMapAssert) (Object) null; }1575 public AbstractMapAssert hasSameClassAs(Object p0) { return (AbstractMapAssert) (Object) null; }1576 public AbstractMapAssert hasToString(String p0) { return (AbstractMapAssert) (Object) null; }1577 public AbstractMapAssert is(Condition p0) { return (AbstractMapAssert) (Object) null; }1578 public AbstractMapAssert isEqualTo(Object p0) { return (AbstractMapAssert) (Object) null; }1579 public AbstractMapAssert isExactlyInstanceOf(Class p0) { return (AbstractMapAssert) (Object) null; }1580 public AbstractMapAssert isIn(Iterable p0) { return (AbstractMapAssert) (Object) null; }1581 public AbstractMapAssert isIn(Object[] p0) { return (AbstractMapAssert) (Object) null; }1582 public AbstractMapAssert isInstanceOf(Class p0) { return (AbstractMapAssert) (Object) null; }1583 public AbstractMapAssert isInstanceOfAny(Class[] p0) { return (AbstractMapAssert) (Object) null; }1584 public AbstractMapAssert isNot(Condition p0) { return (AbstractMapAssert) (Object) null; }1585 public AbstractMapAssert isNotEqualTo(Object p0) { return (AbstractMapAssert) (Object) null; }1586 public AbstractMapAssert isNotExactlyInstanceOf(Class p0) { return (AbstractMapAssert) (Object) null; }1587 public AbstractMapAssert isNotIn(Iterable p0) { return (AbstractMapAssert) (Object) null; }1588 public AbstractMapAssert isNotIn(Object[] p0) { return (AbstractMapAssert) (Object) null; }1589 public AbstractMapAssert isNotInstanceOf(Class p0) { return (AbstractMapAssert) (Object) null; }1590 public AbstractMapAssert isNotInstanceOfAny(Class[] p0) { return (AbstractMapAssert) (Object) null; }1591 public AbstractMapAssert isNotOfAnyClassIn(Class[] p0) { return (AbstractMapAssert) (Object) null; }1592 public AbstractMapAssert isNotNull() { return (AbstractMapAssert) (Object) null; }1593 public AbstractMapAssert isNotSameAs(Object p0) { return (AbstractMapAssert) (Object) null; }1594 public AbstractMapAssert isOfAnyClassIn(Class[] p0) { return (AbstractMapAssert) (Object) null; }1595 public AbstractMapAssert isSameAs(Object p0) { return (AbstractMapAssert) (Object) null; }1596 public AbstractMapAssert overridingErrorMessage(String p0, Object[] p1) { return (AbstractMapAssert) (Object) null; }1597 public AbstractMapAssert usingDefaultComparator() { return (AbstractMapAssert) (Object) null; }1598 public AbstractMapAssert usingComparator(java.util.Comparator p0) { return (AbstractMapAssert) (Object) null; }1599 public AbstractMapAssert usingComparator(java.util.Comparator p0, String p1) { return (AbstractMapAssert) (Object) null; }1600 public AbstractMapAssert withFailMessage(String p0, Object[] p1) { return (AbstractMapAssert) (Object) null; }1601 public AbstractMapAssert withThreadDumpOnError() { return (AbstractMapAssert) (Object) null; }1602 public AbstractMapSizeAssert size() { return (AbstractMapSizeAssert) (Object) null; }1603 public AbstractListAssert extracting(Object[] p0) { return (AbstractListAssert) (Object) null; }1604 public AbstractListAssert extractingByKeys(Object[] p0) { return (AbstractListAssert) (Object) null; }1605 public AbstractObjectAssert extracting(Object p0) { return (AbstractObjectAssert) (Object) null; }1606 public AbstractObjectAssert extractingByKey(Object p0) { return (AbstractObjectAssert) (Object) null; }1607 public AbstractAssert extractingByKey(Object p0, InstanceOfAssertFactory p1) { return (AbstractAssert) (Object) null; }1608 public AbstractListAssert extractingFromEntries(java.util.function.Function p0) { return (AbstractListAssert) (Object) null; }1609 public AbstractListAssert extractingFromEntries(java.util.function.Function[] p0) { return (AbstractListAssert) (Object) null; }1610 public AbstractListAssert flatExtracting(String[] p0) { return (AbstractListAssert) (Object) null; }1611 public RecursiveComparisonAssert usingRecursiveComparison() { return (RecursiveComparisonAssert) (Object) null; }1612 public RecursiveComparisonAssert usingRecursiveComparison(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (RecursiveComparisonAssert) (Object) null; }1613}1614---1615package org.assertj.core.api;1616import java.io.*;1617public abstract class AbstractMapSizeAssert extends AbstractIntegerAssert {1618 public abstract AbstractMapAssert returnToMap();1619}1620---1621package org.assertj.core.api;1622import java.io.*;1623public abstract class AbstractObjectArrayAssert extends AbstractAssert implements IndexedObjectEnumerableAssert, ArraySortedAssert {1624 public AbstractObjectArrayAssert as(org.assertj.core.description.Description p0) { return (AbstractObjectArrayAssert) (Object) null; }1625 public AbstractObjectArrayAssert as(String p0, Object[] p1) { return (AbstractObjectArrayAssert) (Object) null; }1626 public void isNullOrEmpty() {}1627 public void isEmpty() {}1628 public AbstractObjectArrayAssert isNotEmpty() { return (AbstractObjectArrayAssert) (Object) null; }1629 public AbstractObjectArrayAssert hasSize(int p0) { return (AbstractObjectArrayAssert) (Object) null; }1630 public AbstractObjectArrayAssert hasSizeGreaterThan(int p0) { return (AbstractObjectArrayAssert) (Object) null; }1631 public AbstractObjectArrayAssert hasSizeGreaterThanOrEqualTo(int p0) { return (AbstractObjectArrayAssert) (Object) null; }1632 public AbstractObjectArrayAssert hasSizeLessThan(int p0) { return (AbstractObjectArrayAssert) (Object) null; }1633 public AbstractObjectArrayAssert hasSizeLessThanOrEqualTo(int p0) { return (AbstractObjectArrayAssert) (Object) null; }1634 public AbstractObjectArrayAssert hasSizeBetween(int p0, int p1) { return (AbstractObjectArrayAssert) (Object) null; }1635 public AbstractObjectArrayAssert hasSameSizeAs(Object p0) { return (AbstractObjectArrayAssert) (Object) null; }1636 public AbstractObjectArrayAssert hasSameSizeAs(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1637 public AbstractObjectArrayAssert contains(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1638 public AbstractObjectArrayAssert containsOnly(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1639 public AbstractObjectArrayAssert containsOnlyElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1640 public AbstractObjectArrayAssert containsOnlyNulls() { return (AbstractObjectArrayAssert) (Object) null; }1641 public AbstractObjectArrayAssert hasOnlyOneElementSatisfying(java.util.function.Consumer p0) { return (AbstractObjectArrayAssert) (Object) null; }1642 public AbstractObjectArrayAssert hasSameElementsAs(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1643 public AbstractObjectArrayAssert containsOnlyOnce(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1644 public AbstractObjectArrayAssert containsOnlyOnceElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1645 public AbstractObjectArrayAssert containsExactly(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1646 public AbstractObjectArrayAssert containsExactlyInAnyOrder(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1647 public AbstractObjectArrayAssert containsExactlyInAnyOrderElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1648 public AbstractObjectArrayAssert containsExactlyElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1649 public AbstractObjectArrayAssert containsSequence(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1650 public AbstractObjectArrayAssert containsSequence(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1651 public AbstractObjectArrayAssert doesNotContainSequence(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1652 public AbstractObjectArrayAssert doesNotContainSequence(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1653 public AbstractObjectArrayAssert containsSubsequence(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1654 public AbstractObjectArrayAssert containsSubsequence(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1655 public AbstractObjectArrayAssert doesNotContainSubsequence(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1656 public AbstractObjectArrayAssert doesNotContainSubsequence(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1657 public AbstractObjectArrayAssert contains(Object p0, org.assertj.core.data.Index p1) { return (AbstractObjectArrayAssert) (Object) null; }1658 public AbstractObjectArrayAssert hasOnlyElementsOfTypes(Class[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1659 public AbstractObjectArrayAssert doesNotContain(Object p0, org.assertj.core.data.Index p1) { return (AbstractObjectArrayAssert) (Object) null; }1660 public AbstractObjectArrayAssert doesNotContain(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1661 public AbstractObjectArrayAssert doesNotContainAnyElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1662 public AbstractObjectArrayAssert doesNotHaveDuplicates() { return (AbstractObjectArrayAssert) (Object) null; }1663 public AbstractObjectArrayAssert startsWith(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1664 public AbstractObjectArrayAssert endsWith(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1665 public AbstractObjectArrayAssert endsWith(Object p0, Object[] p1) { return (AbstractObjectArrayAssert) (Object) null; }1666 public AbstractObjectArrayAssert isSubsetOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1667 public AbstractObjectArrayAssert isSubsetOf(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1668 public AbstractObjectArrayAssert containsNull() { return (AbstractObjectArrayAssert) (Object) null; }1669 public AbstractObjectArrayAssert doesNotContainNull() { return (AbstractObjectArrayAssert) (Object) null; }1670 public AbstractObjectArrayAssert are(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1671 public AbstractObjectArrayAssert areNot(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1672 public AbstractObjectArrayAssert have(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1673 public AbstractObjectArrayAssert doNotHave(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1674 public AbstractObjectArrayAssert areAtLeast(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1675 public AbstractObjectArrayAssert areAtLeastOne(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1676 public AbstractObjectArrayAssert areAtMost(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1677 public AbstractObjectArrayAssert areExactly(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1678 public AbstractObjectArrayAssert haveAtLeastOne(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1679 public AbstractObjectArrayAssert haveAtLeast(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1680 public AbstractObjectArrayAssert haveAtMost(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1681 public AbstractObjectArrayAssert haveExactly(int p0, Condition p1) { return (AbstractObjectArrayAssert) (Object) null; }1682 public AbstractObjectArrayAssert hasAtLeastOneElementOfType(Class p0) { return (AbstractObjectArrayAssert) (Object) null; }1683 public AbstractObjectArrayAssert hasOnlyElementsOfType(Class p0) { return (AbstractObjectArrayAssert) (Object) null; }1684 public AbstractObjectArrayAssert doesNotHaveAnyElementsOfTypes(Class[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1685 public AbstractObjectArrayAssert isSorted() { return (AbstractObjectArrayAssert) (Object) null; }1686 public AbstractObjectArrayAssert isSortedAccordingTo(java.util.Comparator p0) { return (AbstractObjectArrayAssert) (Object) null; }1687 public AbstractObjectArrayAssert containsAll(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1688 public AbstractObjectArrayAssert usingElementComparator(java.util.Comparator p0) { return (AbstractObjectArrayAssert) (Object) null; }1689 public AbstractObjectArrayAssert usingDefaultElementComparator() { return (AbstractObjectArrayAssert) (Object) null; }1690 public AbstractObjectArrayAssert usingComparatorForElementFieldsWithNames(java.util.Comparator p0, String[] p1) { return (AbstractObjectArrayAssert) (Object) null; }1691 public AbstractObjectArrayAssert usingComparatorForElementFieldsWithType(java.util.Comparator p0, Class p1) { return (AbstractObjectArrayAssert) (Object) null; }1692 public AbstractObjectArrayAssert usingComparatorForType(java.util.Comparator p0, Class p1) { return (AbstractObjectArrayAssert) (Object) null; }1693 public AbstractObjectArrayAssert usingFieldByFieldElementComparator() { return (AbstractObjectArrayAssert) (Object) null; }1694 public AbstractObjectArrayAssert usingRecursiveFieldByFieldElementComparator() { return (AbstractObjectArrayAssert) (Object) null; }1695 public AbstractObjectArrayAssert usingElementComparatorOnFields(String[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1696 public AbstractObjectArrayAssert usingElementComparatorIgnoringFields(String[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1697 public AbstractListAssert extracting(String p0) { return (AbstractListAssert) (Object) null; }1698 public AbstractListAssert extracting(String p0, Class p1) { return (AbstractListAssert) (Object) null; }1699 public AbstractListAssert extracting(String[] p0) { return (AbstractListAssert) (Object) null; }1700 public AbstractListAssert extracting(java.util.function.Function p0) { return (AbstractListAssert) (Object) null; }1701 public AbstractListAssert extracting(org.assertj.core.api.iterable.ThrowingExtractor p0) { return (AbstractListAssert) (Object) null; }1702 public AbstractListAssert extracting(java.util.function.Function[] p0) { return (AbstractListAssert) (Object) null; }1703 public AbstractListAssert flatExtracting(java.util.function.Function p0) { return (AbstractListAssert) (Object) null; }1704 public AbstractListAssert flatExtracting(org.assertj.core.api.iterable.ThrowingExtractor p0) { return (AbstractListAssert) (Object) null; }1705 public AbstractListAssert flatExtracting(String p0) { return (AbstractListAssert) (Object) null; }1706 public AbstractListAssert extractingResultOf(String p0) { return (AbstractListAssert) (Object) null; }1707 public AbstractListAssert extractingResultOf(String p0, Class p1) { return (AbstractListAssert) (Object) null; }1708 public AbstractObjectArrayAssert inHexadecimal() { return (AbstractObjectArrayAssert) (Object) null; }1709 public AbstractObjectArrayAssert inBinary() { return (AbstractObjectArrayAssert) (Object) null; }1710 public AbstractObjectArrayAssert filteredOn(String p0, Object p1) { return (AbstractObjectArrayAssert) (Object) null; }1711 public AbstractObjectArrayAssert filteredOnNull(String p0) { return (AbstractObjectArrayAssert) (Object) null; }1712 public AbstractObjectArrayAssert filteredOn(String p0, org.assertj.core.api.filter.FilterOperator p1) { return (AbstractObjectArrayAssert) (Object) null; }1713 public AbstractObjectArrayAssert filteredOn(Condition p0) { return (AbstractObjectArrayAssert) (Object) null; }1714 public AbstractObjectArrayAssert filteredOn(java.util.function.Predicate p0) { return (AbstractObjectArrayAssert) (Object) null; }1715 public AbstractObjectArrayAssert filteredOn(java.util.function.Function p0, Object p1) { return (AbstractObjectArrayAssert) (Object) null; }1716 public AbstractObjectArrayAssert filteredOnAssertions(java.util.function.Consumer p0) { return (AbstractObjectArrayAssert) (Object) null; }1717 public AbstractObjectArrayAssert allMatch(java.util.function.Predicate p0) { return (AbstractObjectArrayAssert) (Object) null; }1718 public AbstractObjectArrayAssert allMatch(java.util.function.Predicate p0, String p1) { return (AbstractObjectArrayAssert) (Object) null; }1719 public AbstractObjectArrayAssert allSatisfy(java.util.function.Consumer p0) { return (AbstractObjectArrayAssert) (Object) null; }1720 public AbstractObjectArrayAssert anyMatch(java.util.function.Predicate p0) { return (AbstractObjectArrayAssert) (Object) null; }1721 public AbstractObjectArrayAssert zipSatisfy(Object[] p0, java.util.function.BiConsumer p1) { return (AbstractObjectArrayAssert) (Object) null; }1722 public AbstractObjectArrayAssert anySatisfy(java.util.function.Consumer p0) { return (AbstractObjectArrayAssert) (Object) null; }1723 public AbstractObjectArrayAssert noneSatisfy(java.util.function.Consumer p0) { return (AbstractObjectArrayAssert) (Object) null; }1724 public AbstractObjectArrayAssert satisfiesExactly(java.util.function.Consumer[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1725 public AbstractObjectArrayAssert satisfiesExactlyInAnyOrder(java.util.function.Consumer[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1726 public AbstractObjectArrayAssert containsAnyOf(Object[] p0) { return (AbstractObjectArrayAssert) (Object) null; }1727 public AbstractObjectArrayAssert containsAnyElementsOf(Iterable p0) { return (AbstractObjectArrayAssert) (Object) null; }1728 public AbstractObjectArrayAssert noneMatch(java.util.function.Predicate p0) { return (AbstractObjectArrayAssert) (Object) null; }1729 public RecursiveComparisonAssert usingRecursiveComparison() { return (RecursiveComparisonAssert) (Object) null; }1730 public RecursiveComparisonAssert usingRecursiveComparison(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (RecursiveComparisonAssert) (Object) null; }1731}1732---1733package org.assertj.core.api;1734import java.io.*;1735public abstract class AbstractObjectAssert extends AbstractAssert {1736 public void AbstractObjectAssert(Object p0, Class p1) {}1737 public AbstractObjectAssert as(org.assertj.core.description.Description p0) { return (AbstractObjectAssert) (Object) null; }1738 public AbstractObjectAssert as(String p0, Object[] p1) { return (AbstractObjectAssert) (Object) null; }1739 public AbstractObjectAssert isEqualToIgnoringNullFields(Object p0) { return (AbstractObjectAssert) (Object) null; }1740 public AbstractObjectAssert isEqualToComparingOnlyGivenFields(Object p0, String[] p1) { return (AbstractObjectAssert) (Object) null; }1741 public AbstractObjectAssert isEqualToIgnoringGivenFields(Object p0, String[] p1) { return (AbstractObjectAssert) (Object) null; }1742 public AbstractObjectAssert hasNoNullFieldsOrProperties() { return (AbstractObjectAssert) (Object) null; }1743 public AbstractObjectAssert hasAllNullFieldsOrProperties() { return (AbstractObjectAssert) (Object) null; }1744 public AbstractObjectAssert hasNoNullFieldsOrPropertiesExcept(String[] p0) { return (AbstractObjectAssert) (Object) null; }1745 public AbstractObjectAssert hasAllNullFieldsOrPropertiesExcept(String[] p0) { return (AbstractObjectAssert) (Object) null; }1746 public AbstractObjectAssert isEqualToComparingFieldByField(Object p0) { return (AbstractObjectAssert) (Object) null; }1747 public AbstractObjectAssert usingComparatorForFields(java.util.Comparator p0, String[] p1) { return (AbstractObjectAssert) (Object) null; }1748 public AbstractObjectAssert usingComparatorForType(java.util.Comparator p0, Class p1) { return (AbstractObjectAssert) (Object) null; }1749 public AbstractObjectAssert hasFieldOrProperty(String p0) { return (AbstractObjectAssert) (Object) null; }1750 public AbstractObjectAssert hasFieldOrPropertyWithValue(String p0, Object p1) { return (AbstractObjectAssert) (Object) null; }1751 public AbstractObjectAssert hasOnlyFields(String[] p0) { return (AbstractObjectAssert) (Object) null; }1752 public AbstractListAssert extracting(String[] p0) { return (AbstractListAssert) (Object) null; }1753 public AbstractObjectAssert extracting(String p0) { return (AbstractObjectAssert) (Object) null; }1754 public AbstractAssert extracting(String p0, InstanceOfAssertFactory p1) { return (AbstractAssert) (Object) null; }1755 public AbstractListAssert extracting(java.util.function.Function[] p0) { return (AbstractListAssert) (Object) null; }1756 public AbstractObjectAssert extracting(java.util.function.Function p0) { return (AbstractObjectAssert) (Object) null; }1757 public AbstractAssert extracting(java.util.function.Function p0, InstanceOfAssertFactory p1) { return (AbstractAssert) (Object) null; }1758 public AbstractObjectAssert isEqualToComparingFieldByFieldRecursively(Object p0) { return (AbstractObjectAssert) (Object) null; }1759 public AbstractObjectAssert returns(Object p0, java.util.function.Function p1) { return (AbstractObjectAssert) (Object) null; }1760 public RecursiveComparisonAssert usingRecursiveComparison() { return (RecursiveComparisonAssert) (Object) null; }1761 public RecursiveComparisonAssert usingRecursiveComparison(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (RecursiveComparisonAssert) (Object) null; }1762}1763---1764package org.assertj.core.api;1765import java.io.*;1766public abstract class AbstractOffsetDateTimeAssert extends AbstractTemporalAssert {1767 public static String NULL_OFFSET_DATE_TIME_PARAMETER_MESSAGE;1768 public AbstractOffsetDateTimeAssert isBefore(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1769 public AbstractOffsetDateTimeAssert isBefore(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1770 public AbstractOffsetDateTimeAssert isBeforeOrEqualTo(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1771 public AbstractOffsetDateTimeAssert isBeforeOrEqualTo(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1772 public AbstractOffsetDateTimeAssert isAfterOrEqualTo(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1773 public AbstractOffsetDateTimeAssert isAfterOrEqualTo(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1774 public AbstractOffsetDateTimeAssert isAfter(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1775 public AbstractOffsetDateTimeAssert isAfter(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1776 public AbstractOffsetDateTimeAssert isEqualTo(Object p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1777 public AbstractOffsetDateTimeAssert isCloseToUtcNow(org.assertj.core.data.TemporalUnitOffset p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1778 public AbstractOffsetDateTimeAssert isEqualTo(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1779 public AbstractOffsetDateTimeAssert isNotEqualTo(Object p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1780 public AbstractOffsetDateTimeAssert isNotEqualTo(String p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1781 public AbstractOffsetDateTimeAssert isIn(String[] p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1782 public AbstractOffsetDateTimeAssert isNotIn(String[] p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1783 public AbstractOffsetDateTimeAssert isEqualToIgnoringNanos(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1784 public AbstractOffsetDateTimeAssert isEqualToIgnoringTimezone(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1785 public AbstractOffsetDateTimeAssert isEqualToIgnoringSeconds(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1786 public AbstractOffsetDateTimeAssert isEqualToIgnoringMinutes(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1787 public AbstractOffsetDateTimeAssert isEqualToIgnoringHours(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1788 public AbstractOffsetDateTimeAssert isBetween(java.time.OffsetDateTime p0, java.time.OffsetDateTime p1) { return (AbstractOffsetDateTimeAssert) (Object) null; }1789 public AbstractOffsetDateTimeAssert isBetween(String p0, String p1) { return (AbstractOffsetDateTimeAssert) (Object) null; }1790 public AbstractOffsetDateTimeAssert isStrictlyBetween(java.time.OffsetDateTime p0, java.time.OffsetDateTime p1) { return (AbstractOffsetDateTimeAssert) (Object) null; }1791 public AbstractOffsetDateTimeAssert isStrictlyBetween(String p0, String p1) { return (AbstractOffsetDateTimeAssert) (Object) null; }1792 public AbstractOffsetDateTimeAssert usingDefaultComparator() { return (AbstractOffsetDateTimeAssert) (Object) null; }1793 public AbstractOffsetDateTimeAssert isAtSameInstantAs(java.time.OffsetDateTime p0) { return (AbstractOffsetDateTimeAssert) (Object) null; }1794}1795---1796package org.assertj.core.api;1797import java.io.*;1798public abstract class AbstractOffsetTimeAssert extends AbstractTemporalAssert {1799 public static String NULL_OFFSET_TIME_PARAMETER_MESSAGE;1800 public AbstractOffsetTimeAssert isBefore(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1801 public AbstractOffsetTimeAssert isBefore(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1802 public AbstractOffsetTimeAssert isBeforeOrEqualTo(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1803 public AbstractOffsetTimeAssert isBeforeOrEqualTo(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1804 public AbstractOffsetTimeAssert isAfterOrEqualTo(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1805 public AbstractOffsetTimeAssert isAfterOrEqualTo(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1806 public AbstractOffsetTimeAssert isAfter(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1807 public AbstractOffsetTimeAssert isAfter(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1808 public AbstractOffsetTimeAssert isEqualTo(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1809 public AbstractOffsetTimeAssert isNotEqualTo(String p0) { return (AbstractOffsetTimeAssert) (Object) null; }1810 public AbstractOffsetTimeAssert isIn(String[] p0) { return (AbstractOffsetTimeAssert) (Object) null; }1811 public AbstractOffsetTimeAssert isNotIn(String[] p0) { return (AbstractOffsetTimeAssert) (Object) null; }1812 public AbstractOffsetTimeAssert isEqualToIgnoringNanos(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1813 public AbstractOffsetTimeAssert isEqualToIgnoringSeconds(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1814 public AbstractOffsetTimeAssert isEqualToIgnoringTimezone(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1815 public AbstractOffsetTimeAssert hasSameHourAs(java.time.OffsetTime p0) { return (AbstractOffsetTimeAssert) (Object) null; }1816 public AbstractOffsetTimeAssert isBetween(java.time.OffsetTime p0, java.time.OffsetTime p1) { return (AbstractOffsetTimeAssert) (Object) null; }1817 public AbstractOffsetTimeAssert isBetween(String p0, String p1) { return (AbstractOffsetTimeAssert) (Object) null; }1818 public AbstractOffsetTimeAssert isStrictlyBetween(java.time.OffsetTime p0, java.time.OffsetTime p1) { return (AbstractOffsetTimeAssert) (Object) null; }1819 public AbstractOffsetTimeAssert isStrictlyBetween(String p0, String p1) { return (AbstractOffsetTimeAssert) (Object) null; }1820}1821---1822package org.assertj.core.api;1823import java.io.*;1824public abstract class AbstractOptionalAssert extends AbstractAssert {1825 public AbstractOptionalAssert isPresent() { return (AbstractOptionalAssert) (Object) null; }1826 public AbstractOptionalAssert isNotEmpty() { return (AbstractOptionalAssert) (Object) null; }1827 public AbstractOptionalAssert isEmpty() { return (AbstractOptionalAssert) (Object) null; }1828 public AbstractOptionalAssert isNotPresent() { return (AbstractOptionalAssert) (Object) null; }1829 public AbstractOptionalAssert contains(Object p0) { return (AbstractOptionalAssert) (Object) null; }1830 public AbstractOptionalAssert hasValueSatisfying(java.util.function.Consumer p0) { return (AbstractOptionalAssert) (Object) null; }1831 public AbstractOptionalAssert hasValueSatisfying(Condition p0) { return (AbstractOptionalAssert) (Object) null; }1832 public AbstractOptionalAssert hasValue(Object p0) { return (AbstractOptionalAssert) (Object) null; }1833 public AbstractOptionalAssert containsInstanceOf(Class p0) { return (AbstractOptionalAssert) (Object) null; }1834 public AbstractOptionalAssert usingFieldByFieldValueComparator() { return (AbstractOptionalAssert) (Object) null; }1835 public AbstractOptionalAssert usingValueComparator(java.util.Comparator p0) { return (AbstractOptionalAssert) (Object) null; }1836 public AbstractOptionalAssert usingDefaultValueComparator() { return (AbstractOptionalAssert) (Object) null; }1837 public AbstractOptionalAssert containsSame(Object p0) { return (AbstractOptionalAssert) (Object) null; }1838 public AbstractOptionalAssert flatMap(java.util.function.Function p0) { return (AbstractOptionalAssert) (Object) null; }1839 public AbstractOptionalAssert map(java.util.function.Function p0) { return (AbstractOptionalAssert) (Object) null; }1840 public AbstractObjectAssert get() { return (AbstractObjectAssert) (Object) null; }1841 public AbstractAssert get(InstanceOfAssertFactory p0) { return (AbstractAssert) (Object) null; }1842 public RecursiveComparisonAssert usingRecursiveComparison() { return (RecursiveComparisonAssert) (Object) null; }1843 public RecursiveComparisonAssert usingRecursiveComparison(org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration p0) { return (RecursiveComparisonAssert) (Object) null; }1844}1845---1846package org.assertj.core.api;1847import java.io.*;1848public abstract class AbstractOptionalDoubleAssert extends AbstractAssert {1849 public AbstractOptionalDoubleAssert isPresent() { return (AbstractOptionalDoubleAssert) (Object) null; }1850 public AbstractOptionalDoubleAssert isNotPresent() { return (AbstractOptionalDoubleAssert) (Object) null; }1851 public AbstractOptionalDoubleAssert isEmpty() { return (AbstractOptionalDoubleAssert) (Object) null; }1852 public AbstractOptionalDoubleAssert isNotEmpty() { return (AbstractOptionalDoubleAssert) (Object) null; }1853 public AbstractOptionalDoubleAssert hasValue(double p0) { return (AbstractOptionalDoubleAssert) (Object) null; }1854 public AbstractOptionalDoubleAssert hasValueCloseTo(Double p0, org.assertj.core.data.Offset p1) { return (AbstractOptionalDoubleAssert) (Object) null; }1855 public AbstractOptionalDoubleAssert hasValueCloseTo(Double p0, org.assertj.core.data.Percentage p1) { return (AbstractOptionalDoubleAssert) (Object) null; }1856}1857---...

Full Screen

Full Screen

Source:AbstractObjectArrayAssert.java Github

copy

Full Screen

...1720 * @param elementPropertyOrFieldNames the names of the properties and/or fields of the elements the comparator should be used for1721 * @return {@code this} assertions object1722 * @since 2.5.0 / 3.5.01723 * @deprecated This method is used with {@link #usingFieldByFieldElementComparator()} which is deprecated in favor of1724 * {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)} or {@link #usingRecursiveComparison()}.1725 * <p>1726 * When using {@link #usingRecursiveComparison()} the equivalent is:1727 * <ul>1728 * <li>{@link RecursiveComparisonAssert#withEqualsForFields(java.util.function.BiPredicate, String...)}</li>1729 * <li>{@link RecursiveComparisonAssert#withComparatorForFields(Comparator, String...)}</li>1730 * </ul>1731 * <p>1732 * and when using {@link RecursiveComparisonConfiguration}:1733 * <ul>1734 * <li>{@link RecursiveComparisonConfiguration.Builder#withEqualsForFields(java.util.function.BiPredicate, String...)}</li>1735 * <li>{@link RecursiveComparisonConfiguration.Builder#withComparatorForFields(Comparator, String...)}</li>1736 * </ul>1737 */1738 @Deprecated1739 @CheckReturnValue1740 public <C> SELF usingComparatorForElementFieldsWithNames(Comparator<C> comparator,1741 String... elementPropertyOrFieldNames) {1742 for (String elementPropertyOrField : elementPropertyOrFieldNames) {1743 comparatorsForElementPropertyOrFieldNames.put(elementPropertyOrField, comparator);1744 }1745 return myself;1746 }1747 /**1748 * <u><b>Deprecated javadoc</b></u>1749 * <p>1750 * Allows to set a specific comparator to compare properties or fields of elements with the given type.1751 * A typical usage is for comparing fields of numeric type at a given precision.1752 * <p>1753 * To be used, comparators need to be specified by this method <b>before</b> calling any of:1754 * <ul>1755 * <li>{@link #usingFieldByFieldElementComparator()}</li>1756 * <li>{@link #usingElementComparatorOnFields(String...)}</li>1757 * <li>{@link #usingElementComparatorIgnoringFields(String...)}</li>1758 * </ul>1759 * <p>1760 * Comparators specified by {@link #usingComparatorForElementFieldsWithNames(Comparator, String...) usingComparatorForElementFieldsWithNames}1761 * have precedence over comparators specified by this method.1762 * <p>1763 * Example:1764 * <pre><code class='java'> public class TolkienCharacter {1765 * private String name;1766 * private double height;1767 * // constructor omitted1768 * }1769 * TolkienCharacter frodo = new TolkienCharacter(&quot;Frodo&quot;, 1.2);1770 * TolkienCharacter tallerFrodo = new TolkienCharacter(&quot;Frodo&quot;, 1.3);1771 * TolkienCharacter reallyTallFrodo = new TolkienCharacter(&quot;Frodo&quot;, 1.9);1772 *1773 * Comparator&lt;Double&gt; closeEnough = new Comparator&lt;Double&gt;() {1774 * double precision = 0.5;1775 * public int compare(Double d1, Double d2) {1776 * return Math.abs(d1 - d2) &lt;= precision ? 0 : 1;1777 * }1778 * };1779 *1780 * TolkienCharacter[] hobbits = new TolkienCharacter[] {frodo};1781 *1782 * // assertions will pass1783 * assertThat(hobbits).usingComparatorForElementFieldsWithType(closeEnough, Double.class)1784 * .usingFieldByFieldElementComparator()1785 * .contains(tallerFrodo);1786 *1787 * assertThat(hobbits).usingComparatorForElementFieldsWithType(closeEnough, Double.class)1788 * .usingElementComparatorOnFields(&quot;height&quot;)1789 * .contains(tallerFrodo);1790 *1791 * assertThat(hobbits).usingComparatorForElementFieldsWithType(closeEnough, Double.class)1792 * .usingElementComparatorIgnoringFields(&quot;name&quot;)1793 * .contains(tallerFrodo);1794 *1795 * assertThat(hobbits).usingComparatorForElementFieldsWithType(closeEnough, Double.class)1796 * .usingRecursiveFieldByFieldElementComparator()1797 * .contains(tallerFrodo);1798 *1799 * // assertion will fail1800 * assertThat(hobbits).usingComparatorForElementFieldsWithType(closeEnough, Double.class)1801 * .usingFieldByFieldElementComparator()1802 * .contains(reallyTallFrodo);</code></pre>1803 *1804 * If multiple compatible comparators have been registered for a given {@code type}, the closest in the inheritance1805 * chain to the given {@code type} is chosen in the following order:1806 * <ol>1807 * <li>The comparator for the exact given {@code type}</li>1808 * <li>The comparator of a superclass of the given {@code type}</li>1809 * <li>The comparator of an interface implemented by the given {@code type}</li>1810 * </ol>1811 *1812 * @param <C> the type of elements to compare.1813 * @param comparator the {@link java.util.Comparator} to use1814 * @param type the {@link java.lang.Class} of the type of the element fields the comparator should be used for1815 * @return {@code this} assertions object1816 * @since 2.5.0 / 3.5.01817 * @deprecated This method is used with {@link #usingFieldByFieldElementComparator()} which is deprecated in favor of1818 * {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)} or {@link #usingRecursiveComparison()}.1819 * <p>1820 * When using {@link #usingRecursiveComparison()} the equivalent is:1821 * <ul>1822 * <li>{@link RecursiveComparisonAssert#withEqualsForType(java.util.function.BiPredicate, Class)}</li>1823 * <li>{@link RecursiveComparisonAssert#withComparatorForType(Comparator, Class)}</li>1824 * </ul>1825 * <p>1826 * and when using {@link RecursiveComparisonConfiguration}:1827 * <ul>1828 * <li>{@link RecursiveComparisonConfiguration.Builder#withEqualsForType(java.util.function.BiPredicate, Class)}</li>1829 * <li>{@link RecursiveComparisonConfiguration.Builder#withComparatorForType(Comparator, Class)}</li>1830 * </ul>1831 */1832 @Deprecated1833 @CheckReturnValue1834 public <C> SELF usingComparatorForElementFieldsWithType(Comparator<C> comparator, Class<C> type) {1835 getComparatorsForElementPropertyOrFieldTypes().registerComparator(type, comparator);1836 return myself;1837 }1838 /**1839 * Allows to set a specific comparator for the given type of elements or their fields.1840 * Extends {@link #usingComparatorForElementFieldsWithType} by applying comparator specified for given type1841 * to elements themselves, not only to their fields.1842 * <p>1843 * Usage of this method affects comparators set by the following methods:1844 * <ul>1845 * <li>{@link #usingFieldByFieldElementComparator()}</li>1846 * <li>{@link #usingElementComparatorOnFields(String...)}</li>1847 * <li>{@link #usingElementComparatorIgnoringFields(String...)}</li>1848 * </ul>1849 * <p>1850 * Example:1851 * <pre><code class='java'> Person obiwan = new Person("Obi-Wan");1852 * obiwan.setHeight(new BigDecimal("1.820"));1853 *1854 * // assertion will pass1855 * assertThat(obiwan).extracting("name", "height")1856 * .usingComparatorForType(BIG_DECIMAL_COMPARATOR, BigDecimal.class)1857 * .containsExactly("Obi-Wan", new BigDecimal("1.82"));</code></pre>1858 *1859 * @param <C> the type of elements to compare.1860 * @param comparator the {@link java.util.Comparator} to use1861 * @param type the {@link java.lang.Class} of the type of the element or element fields the comparator should be used for1862 * @return {@code this} assertions object1863 * @since 2.9.0 / 3.9.01864 */1865 @CheckReturnValue1866 public <C> SELF usingComparatorForType(Comparator<C> comparator, Class<C> type) {1867 if (arrays.getComparator() == null) {1868 usingElementComparator(new ExtendedByTypesComparator(getComparatorsByType()));1869 }1870 getComparatorsForElementPropertyOrFieldTypes().registerComparator(type, comparator);1871 getComparatorsByType().registerComparator(type, comparator);1872 return myself;1873 }1874 /**1875 * <b><u>Deprecated javadoc</u></b>1876 * <p>1877 * Use field/property by field/property comparison (including inherited fields/properties) instead of relying on1878 * actual type A <code>equals</code> method to compare group elements for incoming assertion checks. Private fields1879 * are included but this can be disabled using {@link Assertions#setAllowExtractingPrivateFields(boolean)}.1880 * <p>1881 * This can be handy if <code>equals</code> method of the objects to compare does not suit you.1882 * <p>1883 * You can specify a custom comparator per name or type of element field with1884 * {@link #usingComparatorForElementFieldsWithNames(Comparator, String...)}1885 * and {@link #usingComparatorForElementFieldsWithType(Comparator, Class)}.1886 * <p>1887 * Note that the comparison is <b>not</b> recursive, if one of the fields/properties is an Object, it will be compared1888 * to the other field/property using its <code>equals</code> method.1889 * <p>1890 * Example:1891 * <pre><code class='java'> TolkienCharacter frodo = new TolkienCharacter("Frodo", 33, HOBBIT);1892 * TolkienCharacter frodoClone = new TolkienCharacter("Frodo", 33, HOBBIT);1893 *1894 * // Fail if equals has not been overridden in TolkienCharacter as equals default implementation only compares references1895 * assertThat(array(frodo)).contains(frodoClone);1896 *1897 * // frodo and frodoClone are equals when doing a field by field comparison.1898 * assertThat(array(frodo)).usingFieldByFieldElementComparator().contains(frodoClone);</code></pre>1899 *1900 * @return {@code this} assertion object.1901 * @deprecated This method is deprecated because it performs a <b>shallow</b> field by field comparison, i.e. elements are compared1902 * field by field but the fields are compared with equals, use {@link #usingRecursiveFieldByFieldElementComparator()}1903 * or {@link #usingRecursiveComparison()} instead to perform a true recursive comparison.1904 * <br>See <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>1905 */1906 @Deprecated1907 @CheckReturnValue1908 public SELF usingFieldByFieldElementComparator() {1909 return usingExtendedByTypesElementComparator(new FieldByFieldComparator(comparatorsForElementPropertyOrFieldNames,1910 getComparatorsForElementPropertyOrFieldTypes()));1911 }1912 /**1913 * Enable using a recursive field by field comparison strategy similar to {@link #usingRecursiveComparison()} but contrary to the latter <b>you can chain any iterable assertions after this method</b> (this is why this method exists).1914 * <p>1915 * This method uses the default {@link RecursiveComparisonConfiguration}, if you need to customize it use {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)} instead.1916 * <p>1917 * <b>Breaking change:</b> since 3.20.0 the comparison won't use any comparators set with:1918 * <ul>1919 * <li>{@link #usingComparatorForType(Comparator, Class)}</li>1920 * <li>{@link #withTypeComparators(TypeComparators)}</li>1921 * <li>{@link #usingComparatorForElementFieldsWithType(Comparator, Class)}</li>1922 * <li>{@link #withComparatorsForElementPropertyOrFieldTypes(TypeComparators)}</li>1923 * <li>{@link #usingComparatorForElementFieldsWithNames(Comparator, String...)}</li>1924 * <li>{@link #withComparatorsForElementPropertyOrFieldNames(Map)}</li>1925 * </ul>1926 * <p>1927 * These features (and many more) are provided through {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)} with a customized {@link RecursiveComparisonConfiguration} where there methods are called:1928 * <ul>1929 * <li>{@link RecursiveComparisonConfiguration#registerComparatorForType(Comparator, Class) registerComparatorForType(Comparator, Class)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForType(Comparator, Class) withComparatorForType(Comparator, Class)} (using {@link RecursiveComparisonConfiguration.Builder})</li>1930 * <li>{@link RecursiveComparisonConfiguration#registerEqualsForType(java.util.function.BiPredicate, Class) registerEqualsForType(BiPredicate, Class)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForType(Comparator, Class) withComparatorForType(Comparator, Class)} (using {@link RecursiveComparisonConfiguration.Builder})</li>1931 * <li>{@link RecursiveComparisonConfiguration#registerComparatorForFields(Comparator, String...) registerComparatorForFields(Comparator comparator, String... fields)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForFields(Comparator, String...) withComparatorForField(Comparator comparator, String... fields)} (using {@link RecursiveComparisonConfiguration.Builder})</li>1932 * </ul>1933 * <p>1934 * There are differences between this approach and {@link #usingRecursiveComparison()}:1935 * <ul>1936 * <li>contrary to {@link RecursiveComparisonAssert}, you can chain any iterable assertions after this method.</li>1937 * <li>no comparators registered with {@link AbstractIterableAssert#usingComparatorForType(Comparator, Class)} will be used, you need to register them in the configuration object.</li>1938 * <li>the assertion errors won't be as detailed as {@link RecursiveComparisonAssert#isEqualTo(Object)} which shows the field differences.</li>1939 * </ul>1940 * <p>1941 * This last point makes sense, take the {@link #contains(Object...)} assertion, it would not be relevant to report the differences of all the iterable's elements differing from the values to look for.1942 * <p>1943 * Example:1944 * <pre><code class='java'> public class Person {1945 * String name;1946 * boolean hasPhd;1947 * }1948 *1949 * public class Doctor {1950 * String name;1951 * boolean hasPhd;1952 * }1953 *1954 * Doctor drSheldon = new Doctor("Sheldon Cooper", true);1955 * Doctor drLeonard = new Doctor("Leonard Hofstadter", true);1956 * Doctor drRaj = new Doctor("Raj Koothrappali", true);1957 *1958 * Person sheldon = new Person("Sheldon Cooper", true);1959 * Person leonard = new Person("Leonard Hofstadter", true);1960 * Person raj = new Person("Raj Koothrappali", true);1961 * Person howard = new Person("Howard Wolowitz", true);1962 *1963 * Doctor[] doctors = array(drSheldon, drLeonard, drRaj);1964 * Person[] people = array(sheldon, leonard, raj);1965 *1966 * // assertion succeeds as both lists contains equivalent items in order.1967 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator()1968 * .contains(sheldon);1969 *1970 * // assertion fails because leonard names are different.1971 * leonard.setName("Leonard Ofstater");1972 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator()1973 * .contains(leonard);1974 *1975 * // assertion fails because howard is missing and leonard is not expected.1976 * people = list(howard, sheldon, raj)1977 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator()1978 * .contains(howard);</code></pre>1979 * <p>1980 * Another point worth mentioning: <b>elements order does matter if the expected iterable is ordered</b>, for example comparing a {@code Set<Person>} to a {@code List<Person>} fails as {@code List} is ordered and {@code Set} is not.<br>1981 * The ordering can be ignored by calling {@link RecursiveComparisonAssert#ignoringCollectionOrder ignoringCollectionOrder} allowing ordered/unordered iterable comparison, note that {@link RecursiveComparisonAssert#ignoringCollectionOrder ignoringCollectionOrder} is applied recursively on any nested iterable fields, if this behavior is too generic,1982 * use the more fine grained {@link RecursiveComparisonAssert#ignoringCollectionOrderInFields(String...) ignoringCollectionOrderInFields} or1983 * {@link RecursiveComparisonAssert#ignoringCollectionOrderInFieldsMatchingRegexes(String...) ignoringCollectionOrderInFieldsMatchingRegexes}.1984 *1985 * @return {@code this} assertion object.1986 * @since 2.5.0 / 3.5.0 - breaking change in 3.20.01987 * @see RecursiveComparisonConfiguration1988 * @see #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)1989 */1990 @CheckReturnValue1991 public SELF usingRecursiveFieldByFieldElementComparator() {1992 return usingRecursiveFieldByFieldElementComparator(new RecursiveComparisonConfiguration());1993 }1994 /**1995 * Enable using a recursive field by field comparison strategy similar to {@link #usingRecursiveComparison()} but contrary to the latter <b>you can chain any iterable assertions after this method</b> (this is why this method exists).1996 * <p>1997 * The given {@link RecursiveComparisonConfiguration} is used to tweak the comparison behavior, for example by {@link RecursiveComparisonConfiguration#ignoreCollectionOrder(boolean) ignoring collection order}.1998 * <p>1999 * <b>Warning:</b> the comparison won't use any comparators set with:2000 * <ul>2001 * <li>{@link #usingComparatorForType(Comparator, Class)}</li>2002 * <li>{@link #withTypeComparators(TypeComparators)}</li>2003 * <li>{@link #usingComparatorForElementFieldsWithType(Comparator, Class)}</li>2004 * <li>{@link #withComparatorsForElementPropertyOrFieldTypes(TypeComparators)}</li>2005 * <li>{@link #usingComparatorForElementFieldsWithNames(Comparator, String...)}</li>2006 * <li>{@link #withComparatorsForElementPropertyOrFieldNames(Map)}</li>2007 * </ul>2008 * <p>2009 * These features (and many more) are provided through {@link RecursiveComparisonConfiguration} with:2010 * <ul>2011 * <li>{@link RecursiveComparisonConfiguration#registerComparatorForType(Comparator, Class) registerComparatorForType(Comparator, Class)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForType(Comparator, Class) withComparatorForType(Comparator, Class)} (using {@link RecursiveComparisonConfiguration.Builder})</li>2012 * <li>{@link RecursiveComparisonConfiguration#registerEqualsForType(java.util.function.BiPredicate, Class) registerEqualsForType(BiPredicate, Class)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForType(Comparator, Class) withComparatorForType(Comparator, Class)} (using {@link RecursiveComparisonConfiguration.Builder})</li>2013 * <li>{@link RecursiveComparisonConfiguration#registerComparatorForFields(Comparator, String...) registerComparatorForFields(Comparator comparator, String... fields)} / {@link RecursiveComparisonConfiguration.Builder#withComparatorForFields(Comparator, String...) withComparatorForField(Comparator comparator, String... fields)} (using {@link RecursiveComparisonConfiguration.Builder})</li>2014 * </ul>2015 * <p>2016 * RecursiveComparisonConfiguration exposes a {@link RecursiveComparisonConfiguration.Builder builder} to ease setting the comparison behaviour,2017 * call {@link RecursiveComparisonConfiguration#builder() RecursiveComparisonConfiguration.builder()} to start building your configuration.2018 * <p>2019 * There are differences between this approach and {@link #usingRecursiveComparison()}:2020 * <ul>2021 * <li>contrary to {@link RecursiveComparisonAssert}, you can chain any iterable assertions after this method.</li>2022 * <li>no comparators registered with {@link AbstractIterableAssert#usingComparatorForType(Comparator, Class)} will be used, you need to register them in the configuration object.</li>2023 * <li>the assertion errors won't be as detailed as {@link RecursiveComparisonAssert#isEqualTo(Object)} which shows the field differences.</li>2024 * </ul>2025 * <p>2026 * This last point makes sense, take the {@link #contains(Object...)} assertion, it would not be relevant to report the differences of all the iterable's elements differing from the values to look for.2027 * <p>2028 * Example:2029 * <pre><code class='java'> public class Person {2030 * String name;2031 * boolean hasPhd;2032 * }2033 *2034 * public class Doctor {2035 * String name;2036 * boolean hasPhd;2037 * }2038 *2039 * Doctor drSheldon = new Doctor("Sheldon Cooper", true);2040 * Doctor drLeonard = new Doctor("Leonard Hofstadter", true);2041 * Doctor drRaj = new Doctor("Raj Koothrappali", true);2042 *2043 * Person sheldon = new Person("Sheldon Cooper", false);2044 * Person leonard = new Person("Leonard Hofstadter", false);2045 * Person raj = new Person("Raj Koothrappali", false);2046 * Person howard = new Person("Howard Wolowitz", false);2047 *2048 * Doctor[] doctors = array(drSheldon, drLeonard, drRaj);2049 * Person[] people = array(sheldon, leonard, raj);2050 *2051 * RecursiveComparisonConfiguration configuration = RecursiveComparisonConfiguration.builder()2052 * .withIgnoredFields​("hasPhd");2053 *2054 * // assertion succeeds as both lists contains equivalent items in order.2055 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator(configuration)2056 * .contains(sheldon);2057 *2058 * // assertion fails because leonard names are different.2059 * leonard.setName("Leonard Ofstater");2060 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator(configuration)2061 * .contains(leonard);2062 *2063 * // assertion fails because howard is missing and leonard is not expected.2064 * people = list(howard, sheldon, raj)2065 * assertThat(doctors).usingRecursiveFieldByFieldElementComparator(configuration)2066 * .contains(howard);</code></pre>2067 *2068 * A detailed documentation for the recursive comparison is available here: <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>.2069 * <p>2070 * A point worth mentioning: <b>elements order does matter if the expected iterable is ordered</b>, for example comparing a {@code Set<Person>} to a {@code List<Person>} fails as {@code List} is ordered and {@code Set} is not.<br>2071 * The ordering can be ignored by calling {@link RecursiveComparisonAssert#ignoringCollectionOrder ignoringCollectionOrder} allowing ordered/unordered iterable comparison, note that {@link RecursiveComparisonAssert#ignoringCollectionOrder ignoringCollectionOrder} is applied recursively on any nested iterable fields, if this behavior is too generic,2072 * use the more fine grained {@link RecursiveComparisonAssert#ignoringCollectionOrderInFields(String...) ignoringCollectionOrderInFields} or2073 * {@link RecursiveComparisonAssert#ignoringCollectionOrderInFieldsMatchingRegexes(String...) ignoringCollectionOrderInFieldsMatchingRegexes}.2074 *2075 * @param configuration the recursive comparison configuration.2076 *2077 * @return {@code this} assertion object.2078 * @since 3.20.02079 * @see RecursiveComparisonConfiguration2080 */2081 public SELF usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration configuration) {2082 return usingElementComparator(new ConfigurableRecursiveFieldByFieldComparator(configuration));2083 }2084 /**2085 * <b><u>Deprecated javadoc</u></b>2086 * <p>2087 * Use field/property by field/property comparison on the <b>given fields/properties only</b> (including inherited2088 * fields/properties) instead of relying on actual type A <code>equals</code> method to compare group elements for2089 * incoming assertion checks. Private fields are included but this can be disabled using2090 * {@link Assertions#setAllowExtractingPrivateFields(boolean)}.2091 * <p>2092 * This can be handy if <code>equals</code> method of the objects to compare does not suit you.2093 * <p>2094 * You can specify a custom comparator per name or type of element field with2095 * {@link #usingComparatorForElementFieldsWithNames(Comparator, String...)}2096 * and {@link #usingComparatorForElementFieldsWithType(Comparator, Class)}.2097 * <p>2098 * Note that the comparison is <b>not</b> recursive, if one of the fields/properties is an Object, it will be compared2099 * to the other field/property using its <code>equals</code> method.2100 * <p>2101 * Example:2102 * <pre><code class='java'> TolkienCharacter frodo = new TolkienCharacter("Frodo", 33, HOBBIT);2103 * TolkienCharacter sam = new TolkienCharacter("Sam", 38, HOBBIT);2104 *2105 * // frodo and sam both are hobbits, so they are equals when comparing only race2106 * assertThat(array(frodo)).usingElementComparatorOnFields("race").contains(sam); // OK2107 *2108 * // ... but not when comparing both name and race2109 * assertThat(array(frodo)).usingElementComparatorOnFields("name", "race").contains(sam); // FAIL</code></pre>2110 *2111 * @param fields the name of the fields to use the element comparator on2112 * @return {@code this} assertion object.2113 * @see #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)2114 * @see <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2115 * @deprecated This method is deprecated because it performs a <b>shallow</b> field by field comparison, i.e. elements are2116 * compared field by field but the fields are compared with equals, use {@link #usingRecursiveFieldByFieldElementComparatorOnFields(String...)} instead.2117 * <br>See <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2118 */2119 @Deprecated2120 @CheckReturnValue2121 public SELF usingElementComparatorOnFields(String... fields) {2122 return usingExtendedByTypesElementComparator(new OnFieldsComparator(comparatorsForElementPropertyOrFieldNames,2123 getComparatorsForElementPropertyOrFieldTypes(),2124 fields));2125 }2126 /**2127 * The assertions chained after this method will use a recursive field by field comparison on the given fields (including2128 * inherited fields) instead of relying on the element <code>equals</code> method.2129 * This is handy when the element <code>equals</code> method is not overridden or implemented as you expect.2130 * <p>2131 * Nested fields are supported and are expressed like: {@code name.first}2132 * <p>2133 * The comparison is <b>recursive</b>: elements are compared field by field, if a field type has fields they are also compared2134 * field by field (and so on).2135 * <p>2136 * Example:2137 * <pre><code class='java'> Player derrickRose = new Player(new Name("Derrick", "Rose"), "Chicago Bulls");2138 * derrickRose.nickname = new Name("Crazy", "Dunks");2139 *2140 * Player jalenRose = new Player(new Name("Jalen", "Rose"), "Chicago Bulls");2141 * jalenRose.nickname = new Name("Crazy", "Defense");2142 *2143 * // assertion succeeds as all compared fields match2144 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparatorOnFields("name.last", "team", "nickname.first")2145 * .contains(jalenRose);2146 *2147 * // assertion fails, name.first values differ2148 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparatorOnFields("name")2149 * .contains(jalenRose);</code></pre>2150 * <p>2151 * This method is actually a shortcut of {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)}2152 * with a configuration comparing only the given fields, the previous example can be written as:2153 * <pre><code class='java'> RecursiveComparisonConfiguration configuration = RecursiveComparisonConfiguration.builder()2154 * .withComparedFields("name.last", "team", "nickname.first")2155 * .build();2156 *2157 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparator(configuration)2158 * .contains(jalenRose);</code></pre>2159 * The recursive comparison is documented here: <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2160 * <p>2161 * @param fields the field names to exclude in the elements comparison.2162 * @return {@code this} assertion object.2163 * @since 3.20.02164 * @see #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)2165 * @see <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2166 */2167 @CheckReturnValue2168 public SELF usingRecursiveFieldByFieldElementComparatorOnFields(String... fields) {2169 RecursiveComparisonConfiguration recursiveComparisonConfiguration = RecursiveComparisonConfiguration.builder()2170 .withComparedFields(fields)2171 .build();2172 return usingRecursiveFieldByFieldElementComparator(recursiveComparisonConfiguration);2173 }2174 /**2175 * <b><u>Deprecated javadoc</u></b>2176 * <p>2177 * Use field/property by field/property on all fields/properties <b>except</b> the given ones (including inherited2178 * fields/properties) instead of relying on actual type A <code>equals</code> method to compare group elements for2179 * incoming assertion checks. Private fields are included but this can be disabled using2180 * {@link Assertions#setAllowExtractingPrivateFields(boolean)}.2181 * <p>2182 * This can be handy if <code>equals</code> method of the objects to compare does not suit you.2183 * <p>2184 * You can specify a custom comparator per name or type of element field with2185 * {@link #usingComparatorForElementFieldsWithNames(Comparator, String...)}2186 * and {@link #usingComparatorForElementFieldsWithType(Comparator, Class)}.2187 * <p>2188 * Note that the comparison is <b>not</b> recursive, if one of the fields/properties is an Object, it will be compared2189 * to the other field/property using its <code>equals</code> method.2190 * <p>2191 * Example:2192 * <pre><code class='java'> TolkienCharacter frodo = new TolkienCharacter("Frodo", 33, HOBBIT);2193 * TolkienCharacter sam = new TolkienCharacter("Sam", 38, HOBBIT);2194 *2195 * // frodo and sam both are hobbits, so they are equals when comparing only race (i.e. ignoring all other fields)2196 * assertThat(array(frodo)).usingElementComparatorIgnoringFields("name", "age").contains(sam); // OK2197 *2198 * // ... but not when comparing both name and race2199 * assertThat(array(frodo)).usingElementComparatorIgnoringFields("age").contains(sam); // FAIL</code></pre>2200 *2201 * @param fields the name of the fields to ignore2202 * @return {@code this} assertion object.2203 * @see #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)2204 * @see <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2205 * @deprecated This method is deprecated because it performs a <b>shallow</b> field by field comparison, i.e. elements are2206 * compared field by field but the fields are compared with equals, use {@link #usingRecursiveFieldByFieldElementComparatorIgnoringFields(String...)} instead.2207 * <br>See <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2208 */2209 @Deprecated2210 @CheckReturnValue2211 public SELF usingElementComparatorIgnoringFields(String... fields) {2212 return usingExtendedByTypesElementComparator(new IgnoringFieldsComparator(comparatorsForElementPropertyOrFieldNames,2213 getComparatorsForElementPropertyOrFieldTypes(),2214 fields));2215 }2216 /**2217 * The assertions chained after this method will use a recursive field by field comparison on all fields (including inherited2218 * fields) <b>except</b> the given ones instead of relying on the element <code>equals</code> method.2219 * This is handy when the element <code>equals</code> method is not overridden or implemented as you expect.2220 * <p>2221 * Nested fields are supported and are expressed like: {@code name.first}2222 * <p>2223 * The comparison is <b>recursive</b>: elements are compared field by field, if a field type has fields they are also compared2224 * field by field (and so on).2225 * <p>2226 * Example:2227 * <pre><code class='java'> Player derrickRose = new Player(new Name("Derrick", "Rose"), "Chicago Bulls");2228 * derrickRose.nickname = new Name("Crazy", "Dunks");2229 *2230 * Player jalenRose = new Player(new Name("Jalen", "Rose"), "Chicago Bulls");2231 * jalenRose.nickname = new Name("Crazy", "Defense");2232 *2233 * // assertion succeeds2234 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparatorIgnoringFields("name.first", "nickname.last")2235 * .contains(jalenRose);2236 *2237 * // assertion fails, names are ignored but nicknames are not and nickname.last values differ2238 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparatorIgnoringFields("name")2239 * .contains(jalenRose);</code></pre>2240 * <p>2241 * This method is actually a shortcut of {@link #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)}2242 * with a configuration ignoring the given fields, the previous example can be written as:2243 * <pre><code class='java'> RecursiveComparisonConfiguration configuration = RecursiveComparisonConfiguration.builder()2244 * .withIgnoredFields("name.first", "nickname.last")2245 * .build();2246 *2247 * assertThat(array(derrickRose)).usingRecursiveFieldByFieldElementComparator(configuration)2248 * .contains(jalenRose);</code></pre>2249 * The recursive comparison is documented here: <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2250 * <p>2251 * @param fields the field names to exclude in the elements comparison.2252 * @return {@code this} assertion object.2253 * @since 3.20.02254 * @see #usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration)2255 * @see <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>2256 */2257 @CheckReturnValue2258 public SELF usingRecursiveFieldByFieldElementComparatorIgnoringFields(String... fields) {2259 RecursiveComparisonConfiguration recursiveComparisonConfiguration = RecursiveComparisonConfiguration.builder()2260 .withIgnoredFields(fields)2261 .build();2262 return usingRecursiveFieldByFieldElementComparator(recursiveComparisonConfiguration);2263 }2264 /**2265 * Extract the values of given field or property from the array's elements under test into a new list, this new list2266 * becoming the object under test.2267 * <p>2268 * It allows you to test a field/property of the array's elements instead of testing the elements themselves, which can2269 * be much less work !2270 * <p>2271 * Let's take an example to make things clearer :2272 * <pre><code class='java'> // Build a array of TolkienCharacter, a TolkienCharacter has a name (String) and a Race (a class)2273 * // they can be public field or properties, both works when extracting their values.2274 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2275 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2276 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2277 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2278 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2279 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2280 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2281 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2282 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2283 * };2284 *2285 * // let's verify the names of TolkienCharacter in fellowshipOfTheRing :2286 *2287 * assertThat(fellowshipOfTheRing).extracting(&quot;name&quot;)2288 * .contains(&quot;Boromir&quot;, &quot;Gandalf&quot;, &quot;Frodo&quot;)2289 * .doesNotContain(&quot;Sauron&quot;, &quot;Elrond&quot;);2290 *2291 * // you can also extract nested field/property like the name of Race :2292 *2293 * assertThat(fellowshipOfTheRing).extracting(&quot;race.name&quot;)2294 * .contains(&quot;Hobbit&quot;, &quot;Elf&quot;)2295 * .doesNotContain(&quot;Orc&quot;);</code></pre>2296 *2297 * A property with the given name is looked for first, if it does not exist then a field with the given name2298 * is looked for.2299 * <p>2300 * Note that the order of extracted field/property values is consistent with the array order.2301 *2302 * @param fieldOrProperty the field/property to extract from the array under test2303 * @return a new assertion object whose object under test is the list of extracted field/property values.2304 * @throws IntrospectionError if no field or property exists with the given name2305 */2306 @CheckReturnValue2307 public AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object>> extracting(String fieldOrProperty) {2308 Object[] values = FieldsOrPropertiesExtractor.extract(actual, byName(fieldOrProperty));2309 String extractedDescription = extractedDescriptionOf(fieldOrProperty);2310 String description = mostRelevantDescription(info.description(), extractedDescription);2311 return newListAssertInstance(newArrayList(values)).withAssertionState(myself).as(description);2312 }2313 /**2314 * Extract the values of given field or property from the array's elements under test into a new list, this new list of the provided type2315 * becoming the object under test.2316 * <p>2317 * It allows you to test a field/property of the array's elements instead of testing the elements themselves, which can2318 * be much less work !2319 * <p>2320 * Let's take an example to make things clearer :2321 * <pre><code class='java'> // Build an array of TolkienCharacter, a TolkienCharacter has a name (String) and a Race (a class)2322 * // they can be public field or properties, both works when extracting their values.2323 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2324 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2325 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2326 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2327 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2328 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2329 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2330 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2331 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2332 * };2333 *2334 * // let's verify the names of TolkienCharacter in fellowshipOfTheRing :2335 *2336 * assertThat(fellowshipOfTheRing).extracting(&quot;name&quot;, String.class)2337 * .contains(&quot;Boromir&quot;, &quot;Gandalf&quot;, &quot;Frodo&quot;)2338 * .doesNotContain(&quot;Sauron&quot;, &quot;Elrond&quot;);2339 *2340 * // you can also extract nested field/property like the name of Race :2341 *2342 * assertThat(fellowshipOfTheRing).extracting(&quot;race.name&quot;, String.class)2343 * .contains(&quot;Hobbit&quot;, &quot;Elf&quot;)2344 * .doesNotContain(&quot;Orc&quot;);</code></pre>2345 *2346 * A property with the given name is looked for first, if it does not exist then a field with the given name2347 * is looked for.2348 * <p>2349 * Note that the order of extracted field/property values is consistent with the order of the array under test.2350 *2351 * @param <P> the type of elements to extract.2352 * @param fieldOrProperty the field/property to extract from the array under test2353 * @param extractingType type to return2354 * @return a new assertion object whose object under test is the list of extracted field/property values.2355 * @throws IntrospectionError if no field or property exists with the given name2356 */2357 @CheckReturnValue2358 public <P> AbstractListAssert<?, List<? extends P>, P, ObjectAssert<P>> extracting(String fieldOrProperty,2359 Class<P> extractingType) {2360 @SuppressWarnings("unchecked")2361 List<P> values = (List<P>) FieldsOrPropertiesExtractor.extract(Arrays.asList(actual), byName(fieldOrProperty));2362 String extractedDescription = extractedDescriptionOf(fieldOrProperty);2363 String description = mostRelevantDescription(info.description(), extractedDescription);2364 return newListAssertInstance(values).withAssertionState(myself).as(description);2365 }2366 /**2367 * Extract the values of given fields/properties from the array's elements under test into a list composed of2368 * Tuple (a simple data structure), this new list becoming the object under test.2369 * <p>2370 * It allows you to test fields/properties of the array's elements instead of testing the elements themselves, it2371 * can be sometimes much less work !2372 * <p>2373 * The Tuple data corresponds to the extracted values of the given fields/properties, for instance if you ask to2374 * extract "id", "name" and "email" then each Tuple data will be composed of id, name and email extracted from the2375 * element of the initial array (the Tuple's data order is the same as the given fields/properties order).2376 * <p>2377 * Let's take an example to make things clearer :2378 * <pre><code class='java'> // Build an array of TolkienCharacter, a TolkienCharacter has a name (String) and a Race (a class)2379 * // they can be public field or properties, both works when extracting their values.2380 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2381 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2382 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2383 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2384 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2385 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2386 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2387 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2388 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2389 * };2390 *2391 * // let's verify 'name' and 'age' of some TolkienCharacter in fellowshipOfTheRing :2392 *2393 * assertThat(fellowshipOfTheRing).extracting(&quot;name&quot;, &quot;age&quot;)2394 * .contains(tuple(&quot;Boromir&quot;, 37),2395 * tuple(&quot;Sam&quot;, 38),2396 * tuple(&quot;Legolas&quot;, 1000));2397 *2398 *2399 * // extract 'name', 'age' and Race name values.2400 *2401 * assertThat(fellowshipOfTheRing).extracting(&quot;name&quot;, &quot;age&quot;, &quot;race.name&quot;)2402 * .contains(tuple(&quot;Boromir&quot;, 37, &quot;Man&quot;),2403 * tuple(&quot;Sam&quot;, 38, &quot;Hobbit&quot;),2404 * tuple(&quot;Legolas&quot;, 1000, &quot;Elf&quot;));</code></pre>2405 *2406 * A property with the given name is looked for first, if it does not exist the a field with the given name is2407 * looked for.2408 * <p>2409 * Note that the order of extracted property/field values is consistent with the iteration order of the array under2410 * test.2411 *2412 * @param propertiesOrFields the properties/fields to extract from the initial array under test2413 * @return a new assertion object whose object under test is the list of Tuple with extracted properties/fields values as data.2414 * @throws IntrospectionError if one of the given name does not match a field or property in one of the initial Iterable's element.2415 */2416 @CheckReturnValue2417 public AbstractListAssert<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> extracting(String... propertiesOrFields) {2418 List<Tuple> values = FieldsOrPropertiesExtractor.extract(Arrays.asList(actual), byName(propertiesOrFields));2419 String extractedDescription = extractedDescriptionOf(propertiesOrFields);2420 String description = mostRelevantDescription(info.description(), extractedDescription);2421 return newListAssertInstance(values).withAssertionState(myself).as(description);2422 }2423 /**2424 * Extract the values from the array's elements by applying an extracting function on them, the resulting list becomes2425 * the new object under test.2426 * <p>2427 * This method is similar to {@link #extracting(String)} but more refactoring friendly as it does not use introspection.2428 * <p>2429 * Let's take a look an example:2430 * <pre><code class='java'> // Build a list of TolkienCharacter, a TolkienCharacter has a name, and age and a Race (a specific class)2431 * // they can be public field or properties, both can be extracted.2432 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2433 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2434 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2435 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2436 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2437 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2438 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2439 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2440 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2441 * };2442 *2443 * // fellowship has hobbitses, right, my presioussss?2444 * assertThat(fellowshipOfTheRing).extracting(TolkienCharacter::getRace).contains(HOBBIT);</code></pre>2445 *2446 * Note that the order of extracted property/field values is consistent with the iteration order of the Iterable under2447 * test, for example if it's a {@link HashSet}, you won't be able to make any assumptions on the extracted values2448 * order.2449 *2450 * @param <U> the type of elements to extract.2451 * @param extractor the object transforming input object to desired one2452 * @return a new assertion object whose object under test is the list of extracted values.2453 */2454 @CheckReturnValue2455 public <U> AbstractListAssert<?, List<? extends U>, U, ObjectAssert<U>> extracting(Function<? super ELEMENT, U> extractor) {2456 List<U> values = FieldsOrPropertiesExtractor.extract(Arrays.asList(actual), extractor);2457 return newListAssertInstance(values).withAssertionState(myself);2458 }2459 /**2460 * Extract the values from the array's elements by applying an extracting function (which might throw an exception)2461 * on them, the resulting list of extracted values becomes a new object under test.2462 * <p>2463 * Any checked exception raised in the extractor is rethrown wrapped in a {@link RuntimeException}.2464 * <p>2465 * It allows to test values from the elements in safer way than by using {@link #extracting(String)}, as it2466 * doesn't use introspection.2467 * <p>2468 * Let's take a look an example:2469 * <pre><code class='java'> // Build a list of TolkienCharacter, a TolkienCharacter has a name, and age and a Race (a specific class)2470 * // they can be public field or properties, both can be extracted.2471 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2472 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2473 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2474 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2475 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2476 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2477 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2478 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2479 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2480 * };2481 *2482 * assertThat(fellowshipOfTheRing).extracting(input -&gt; {2483 * if (input.getAge() &lt; 20) {2484 * throw new Exception("age &lt; 20");2485 * }2486 * return input.getName();2487 * }).contains("Frodo");</code></pre>2488 * <p>2489 * Note that the order of extracted property/field values is consistent with the iteration order of the array under test.2490 *2491 * @param <V> the type of elements to extract.2492 * @param <EXCEPTION> the exception type of {@link ThrowingExtractor}2493 * @param extractor the object transforming input object to desired one2494 * @return a new assertion object whose object under test is the list of extracted values2495 * @since 3.7.02496 */2497 @CheckReturnValue2498 public <V, EXCEPTION extends Exception> AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> extracting(ThrowingExtractor<? super ELEMENT, V, EXCEPTION> extractor) {2499 List<V> values = FieldsOrPropertiesExtractor.extract(newArrayList(actual), extractor);2500 return newListAssertInstance(values).withAssertionState(myself);2501 }2502 /**2503 * Use the given {@link Function}s to extract the values from the array's elements into a new list2504 * composed of {@link Tuple}s (a simple data structure containing the extracted values), this new list becoming the2505 * object under test.2506 * <p>2507 * It allows you to test values from the array's elements instead of testing the elements themselves, which sometimes can be2508 * much less work!2509 * <p>2510 * The {@link Tuple} data corresponds to the extracted values from the arrays's elements, for instance if you pass functions2511 * extracting "id", "name" and "email" values then each {@link Tuple}'s data will be composed of an id, a name and an email2512 * extracted from the element of the initial array (the Tuple's data order is the same as the given functions order).2513 * <p>2514 * Let's take a look at an example to make things clearer :2515 * <pre><code class='java'> // Build an array of TolkienCharacter, a TolkienCharacter has a name (String) and a Race (a class)2516 * // they can be public field or properties, both works when extracting their values.2517 * TolkienCharacter[] fellowshipOfTheRing = new TolkienCharacter[] {2518 * new TolkienCharacter(&quot;Frodo&quot;, 33, HOBBIT),2519 * new TolkienCharacter(&quot;Sam&quot;, 38, HOBBIT),2520 * new TolkienCharacter(&quot;Gandalf&quot;, 2020, MAIA),2521 * new TolkienCharacter(&quot;Legolas&quot;, 1000, ELF),2522 * new TolkienCharacter(&quot;Pippin&quot;, 28, HOBBIT),2523 * new TolkienCharacter(&quot;Gimli&quot;, 139, DWARF),2524 * new TolkienCharacter(&quot;Aragorn&quot;, 87, MAN,2525 * new TolkienCharacter(&quot;Boromir&quot;, 37, MAN)2526 * };2527 *2528 * // let's verify 'name', 'age' and Race of some TolkienCharacter in fellowshipOfTheRing :2529 * assertThat(fellowshipOfTheRing).extracting(TolkienCharacter::getName,2530 * character -&gt; character.getAge(),2531 * TolkienCharacter::getRace)2532 * .containsOnly(tuple(&quot;Frodo&quot;, 33, HOBBIT),2533 * tuple(&quot;Sam&quot;, 38, HOBBIT),2534 * tuple(&quot;Gandalf&quot;, 2020, MAIA),2535 * tuple(&quot;Legolas&quot;, 1000, ELF),2536 * tuple(&quot;Pippin&quot;, 28, HOBBIT),2537 * tuple(&quot;Gimli&quot;, 139, DWARF),2538 * tuple(&quot;Aragorn&quot;, 87, MAN),2539 * tuple(&quot;Boromir&quot;, 37, MAN));</code></pre>2540 * You can use lambda expression or a method reference to extract the expected values.2541 * <p>2542 * Use {@link Tuple#tuple(Object...)} to initialize the expected values.2543 * <p>2544 * Note that the order of the extracted tuples list is consistent with the iteration order of the array under test,2545 * for example if it's a {@link HashSet}, you won't be able to make any assumptions on the extracted tuples order.2546 *2547 * @param extractors the extractor functions to extract a value from an element of the array under test.2548 * @return a new assertion object whose object under test is the list of Tuples containing the extracted values.2549 */2550 @CheckReturnValue2551 @SafeVarargs2552 public final AbstractListAssert<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> extracting(Function<? super ELEMENT, ?>... extractors) {2553 return extractingForProxy(extractors);2554 }2555 // This method is protected in order to be proxied for SoftAssertions / Assumptions.2556 // The public method for it (the one not ending with "ForProxy") is marked as final and annotated with @SafeVarargs2557 // in order to avoid compiler warning in user code2558 protected AbstractListAssert<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> extractingForProxy(Function<? super ELEMENT, ?>[] extractors) {2559 Function<ELEMENT, Tuple> tupleExtractor = objectToExtractValueFrom -> new Tuple(Stream.of(extractors)2560 .map(extractor -> extractor.apply(objectToExtractValueFrom))2561 .toArray());2562 List<Tuple> tuples = stream(actual).map(tupleExtractor).collect(toList());2563 return newListAssertInstance(tuples).withAssertionState(myself);2564 }2565 /**2566 * Extract the Iterable values from arrays elements under test by applying an Iterable extracting function on them2567 * and concatenating the result lists into an array which becomes the new object under test.2568 * <p>2569 * It allows testing the results of extracting values that are represented by Iterables.2570 * <p>2571 * For example:2572 * <pre><code class='java'> CartoonCharacter bart = new CartoonCharacter("Bart Simpson");2573 * CartoonCharacter lisa = new CartoonCharacter("Lisa Simpson");2574 * CartoonCharacter maggie = new CartoonCharacter("Maggie Simpson");2575 * CartoonCharacter homer = new CartoonCharacter("Homer Simpson");2576 * homer.addChildren(bart, lisa, maggie);2577 *2578 * CartoonCharacter pebbles = new CartoonCharacter("Pebbles Flintstone");2579 * CartoonCharacter fred = new CartoonCharacter("Fred Flintstone");2580 * fred.getChildren().add(pebbles);2581 *2582 * CartoonCharacter[] parents = new CartoonCharacter[] { homer, fred };2583 * // check children2584 * assertThat(parents).flatExtracting(CartoonCharacter::getChildren)2585 * .containsOnly(bart, lisa, maggie, pebbles);</code></pre>2586 *2587 * The order of extracted values is consisted with both the order of the collection itself, as well as the extracted2588 * collections.2589 *2590 * @param <V> the type of elements to extract.2591 * @param <C> the type of collection to flat/extract.2592 * @param extractor the object transforming input object to an Iterable of desired ones2593 * @return a new assertion object whose object under test is the list of values extracted2594 */2595 @CheckReturnValue2596 public <V, C extends Collection<V>> AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> flatExtracting(Function<? super ELEMENT, C> extractor) {2597 return doFlatExtracting(extractor);2598 }2599 /**2600 * Extract the Iterable values from arrays elements under test by applying an Iterable extracting function (which2601 * might throw an exception) on them and concatenating the result lists into an array which becomes the new object2602 * under test.2603 * <p>2604 * It allows testing the results of extracting values that are represented by Iterables.2605 * <p>2606 * For example:2607 * <pre><code class='java'> CartoonCharacter bart = new CartoonCharacter("Bart Simpson");2608 * CartoonCharacter lisa = new CartoonCharacter("Lisa Simpson");2609 * CartoonCharacter maggie = new CartoonCharacter("Maggie Simpson");2610 * CartoonCharacter homer = new CartoonCharacter("Homer Simpson");2611 * homer.addChildren(bart, lisa, maggie);2612 *2613 * CartoonCharacter pebbles = new CartoonCharacter("Pebbles Flintstone");2614 * CartoonCharacter fred = new CartoonCharacter("Fred Flintstone");2615 * fred.getChildren().add(pebbles);2616 *2617 * CartoonCharacter[] parents = new CartoonCharacter[] { homer, fred };2618 * // check children2619 * assertThat(parents).flatExtracting(input -&gt; {2620 * if (input.getChildren().size() == 0) {2621 * throw new Exception("no children");2622 * }2623 * return input.getChildren();2624 * }).containsOnly(bart, lisa, maggie, pebbles);</code></pre>2625 *2626 * The order of extracted values is consisted with both the order of the collection itself, as well as the extracted2627 * collections.2628 *2629 * @param <V> the type of elements to extract.2630 * @param <C> the type of collection to flat/extract.2631 * @param <EXCEPTION> the exception type of {@link ThrowingExtractor}2632 * @param extractor the object transforming input object to an Iterable of desired ones2633 * @return a new assertion object whose object under test is the list of values extracted2634 * @since 3.7.02635 */2636 @CheckReturnValue2637 public <V, C extends Collection<V>, EXCEPTION extends Exception> AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> flatExtracting(ThrowingExtractor<? super ELEMENT, C, EXCEPTION> extractor) {2638 return doFlatExtracting(extractor);2639 }2640 private <V, C extends Collection<V>> AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> doFlatExtracting(Function<? super ELEMENT, C> extractor) {2641 List<V> result = FieldsOrPropertiesExtractor.extract(Arrays.asList(actual), extractor).stream()2642 .flatMap(Collection::stream).collect(toList());2643 return newListAssertInstance(result).withAssertionState(myself);2644 }2645 /**2646 * Extract from array's elements the Iterable/Array values corresponding to the given property/field name and2647 * concatenate them into a single array becoming the new object under test.2648 * <p>2649 * It allows testing the elements of extracting values that are represented by iterables or arrays.2650 * <p>2651 * For example:2652 * <pre><code class='java'> CartoonCharacter bart = new CartoonCharacter("Bart Simpson");2653 * CartoonCharacter lisa = new CartoonCharacter("Lisa Simpson");2654 * CartoonCharacter maggie = new CartoonCharacter("Maggie Simpson");2655 * CartoonCharacter homer = new CartoonCharacter("Homer Simpson");2656 * homer.addChildren(bart, lisa, maggie);2657 *2658 * CartoonCharacter pebbles = new CartoonCharacter("Pebbles Flintstone");2659 * CartoonCharacter fred = new CartoonCharacter("Fred Flintstone");2660 * fred.getChildren().add(pebbles);2661 *2662 * CartoonCharacter[] parents = new CartoonCharacter[] { homer, fred };2663 * // check children2664 * assertThat(parents).flatExtracting("children")2665 * .containsOnly(bart, lisa, maggie, pebbles);</code></pre>2666 *2667 * The order of extracted values is consisted with both the order of the collection itself, as well as the extracted2668 * collections.2669 *2670 * @param propertyName the object transforming input object to an Iterable of desired ones2671 * @return a new assertion object whose object under test is the list of values extracted2672 * @throws IllegalArgumentException if one of the extracted property value was not an array or an iterable.2673 */2674 @CheckReturnValue2675 public AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object>> flatExtracting(String propertyName) {2676 List<Object> extractedValues = newArrayList();2677 List<?> extractedGroups = FieldsOrPropertiesExtractor.extract(Arrays.asList(actual), byName(propertyName));2678 for (Object group : extractedGroups) {2679 // expecting group to be an iterable or an array2680 if (isArray(group)) {2681 int size = Array.getLength(group);2682 for (int i = 0; i < size; i++) {2683 extractedValues.add(Array.get(group, i));2684 }2685 } else if (group instanceof Iterable) {2686 Iterable<?> iterable = (Iterable<?>) group;2687 for (Object value : iterable) {2688 extractedValues.add(value);2689 }2690 } else {2691 CommonErrors.wrongElementTypeForFlatExtracting(group);2692 }2693 }2694 return newListAssertInstance(extractedValues).withAssertionState(myself);2695 }2696 /**2697 * Extract the result of given method invocation from the array's elements under test into a list, this list becoming2698 * the object under test.2699 * <p>2700 * It allows you to test a method results of the array's elements instead of testing the elements themselves, which can be2701 * much less work!2702 * <p>2703 * It is especially useful for classes that does not conform to the Java Bean's getter specification (i.e. public String2704 * toString() or public String status() instead of public String getStatus()).2705 * <p>2706 * Let's take an example to make things clearer :2707 * <pre><code class='java'> // Build a array of WesterosHouse, a WesterosHouse has a method: public String sayTheWords()2708 * WesterosHouse[] greatHousesOfWesteros = new WesterosHouse[] { new WesterosHouse(&quot;Stark&quot;, &quot;Winter is Coming&quot;),2709 * new WesterosHouse(&quot;Lannister&quot;, &quot;Hear Me Roar!&quot;), new WesterosHouse(&quot;Greyjoy&quot;, &quot;We Do Not Sow&quot;),2710 * new WesterosHouse(&quot;Baratheon&quot;, &quot;Our is the Fury&quot;), new WesterosHouse(&quot;Martell&quot;, &quot;Unbowed, Unbent, Unbroken&quot;),2711 * new WesterosHouse(&quot;Tyrell&quot;, &quot;Growing Strong&quot;) };2712 *2713 * // let's verify the words of the great houses of Westeros:2714 * assertThat(greatHousesOfWesteros).extractingResultOf(&quot;sayTheWords&quot;)2715 * .contains(&quot;Winter is Coming&quot;, &quot;We Do Not Sow&quot;, &quot;Hear Me Roar&quot;)2716 * .doesNotContain(&quot;Lannisters always pay their debts&quot;);</code></pre>2717 *2718 * <p>2719 * Following requirements have to be met to extract method results:2720 * <ul>2721 * <li>method has to be public,</li>2722 * <li>method cannot accept any arguments,</li>2723 * <li>method cannot return void.</li>2724 * </ul>2725 * <p>2726 * Note that the order of extracted values is consistent with the order of the array under test.2727 *2728 * @param method the name of the method which result is to be extracted from the array under test2729 * @return a new assertion object whose object under test is the list of extracted values.2730 * @throws IllegalArgumentException if no method exists with the given name, or method is not public, or method does2731 * return void, or method accepts arguments.2732 */2733 @CheckReturnValue2734 public AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object>> extractingResultOf(String method) {2735 Object[] values = FieldsOrPropertiesExtractor.extract(actual, resultOf(method));2736 String extractedDescription = extractedDescriptionOfMethod(method);2737 String description = mostRelevantDescription(info.description(), extractedDescription);2738 return newListAssertInstance(newArrayList(values)).withAssertionState(myself).as(description);2739 }2740 /**2741 * Extract the result of given method invocation from the array's elements under test into a list, this list becoming2742 * the object under test.2743 * <p>2744 * It allows you to test a method results of the array's elements instead of testing the elements themselves, which can be2745 * much less work!2746 * <p>2747 * It is especially useful for classes that do not conform to the Java Bean's getter specification (i.e. public String2748 * toString() or public String status() instead of public String getStatus()).2749 * <p>2750 * Let's take an example to make things clearer :2751 * <pre><code class='java'> // Build a array of WesterosHouse, a WesterosHouse has a method: public String sayTheWords()2752 * WesterosHouse[] greatHousesOfWesteros = new WesterosHouse[] { new WesterosHouse(&quot;Stark&quot;, &quot;Winter is Coming&quot;),2753 * new WesterosHouse(&quot;Lannister&quot;, &quot;Hear Me Roar!&quot;), new WesterosHouse(&quot;Greyjoy&quot;, &quot;We Do Not Sow&quot;),2754 * new WesterosHouse(&quot;Baratheon&quot;, &quot;Our is the Fury&quot;), new WesterosHouse(&quot;Martell&quot;, &quot;Unbowed, Unbent, Unbroken&quot;),2755 * new WesterosHouse(&quot;Tyrell&quot;, &quot;Growing Strong&quot;) };2756 *2757 * // let's verify the words of the great houses of Westeros:2758 * assertThat(greatHousesOfWesteros).extractingResultOf(&quot;sayTheWords&quot;, String.class)2759 * .contains(&quot;Winter is Coming&quot;, &quot;We Do Not Sow&quot;, &quot;Hear Me Roar&quot;)2760 * .doesNotContain(&quot;Lannisters always pay their debts&quot;);</code></pre>2761 *2762 * <p>2763 * Following requirements have to be met to extract method results:2764 * <ul>2765 * <li>method has to be public,</li>2766 * <li>method can not accept any arguments,</li>2767 * <li>method can not return void.</li>2768 * </ul>2769 * <p>2770 * Note that the order of extracted values is consistent with the order of the array under test.2771 *2772 * @param <P> the type of elements extracted.2773 * @param method the name of the method which result is to be extracted from the array under test2774 * @param extractingType type to return2775 * @return a new assertion object whose object under test is the list of extracted values.2776 * @throws IllegalArgumentException if no method exists with the given name, or method is not public, or method does2777 * return void, or method accepts arguments.2778 */2779 @CheckReturnValue2780 public <P> AbstractListAssert<?, List<? extends P>, P, ObjectAssert<P>> extractingResultOf(String method,2781 Class<P> extractingType) {2782 @SuppressWarnings("unchecked")2783 P[] values = (P[]) FieldsOrPropertiesExtractor.extract(actual, resultOf(method));2784 String extractedDescription = extractedDescriptionOfMethod(method);2785 String description = mostRelevantDescription(info.description(), extractedDescription);2786 return newListAssertInstance(newArrayList(values)).withAssertionState(myself).as(description);2787 }2788 /**2789 * Enable hexadecimal object representation of Iterable elements instead of standard java representation in error2790 * messages.2791 * <p>2792 * It can be useful to better understand what the error was with a more meaningful error message.2793 * <p>2794 * Example2795 * <pre><code class='java'> assertThat(new Byte[] { 0x10, 0x20 }).inHexadecimal().contains(new Byte[] { 0x30 });</code></pre>2796 *2797 * With standard error message:2798 * <pre><code class='java'> Expecting:2799 * &lt;[16, 32]&gt;2800 * to contain:2801 * &lt;[48]&gt;2802 * but could not find:2803 * &lt;[48]&gt;</code></pre>2804 *2805 * With Hexadecimal error message:2806 * <pre><code class='java'> Expecting:2807 * &lt;[0x10, 0x20]&gt;2808 * to contain:2809 * &lt;[0x30]&gt;2810 * but could not find:2811 * &lt;[0x30]&gt;</code></pre>2812 *2813 * @return {@code this} assertion object.2814 */2815 @Override2816 @CheckReturnValue2817 public SELF inHexadecimal() {2818 return super.inHexadecimal();2819 }2820 @Override2821 @CheckReturnValue2822 public SELF inBinary() {2823 return super.inBinary();2824 }2825 /**2826 * Filter the array under test into a list composed of the elements elements having a property or field equal to2827 * {@code expectedValue}, the property/field is specified by {@code propertyOrFieldName} parameter.2828 * <p>2829 * The filter first tries to get the value from a property (named {@code propertyOrFieldName}), if no such property2830 * exists it tries to read the value from a field. Reading private fields is supported by default, this can be2831 * globally disabled by calling {@link Assertions#setAllowExtractingPrivateFields(boolean)2832 * Assertions.setAllowExtractingPrivateFields(false)}.2833 * <p>2834 * When reading <b>nested</b> property/field, if an intermediate value is null the whole nested property/field is2835 * considered to be null, thus reading "address.street.name" value will return null if "street" value is null.2836 * <p>2837 *2838 * As an example, let's check all employees 800 years old (yes, special employees):2839 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);2840 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);2841 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);2842 * Employee noname = new Employee(4L, null, 50);2843 *2844 * Employee[] employees = new Employee[] { yoda, luke, obiwan, noname };2845 *2846 * assertThat(employees).filteredOn("age", 800)2847 * .containsOnly(yoda, obiwan);</code></pre>2848 *2849 * Nested properties/fields are supported:2850 * <pre><code class='java'> // Name is bean class with 'first' and 'last' String properties2851 *2852 * // name is null for noname =&gt; it does not match the filter on "name.first"2853 * assertThat(employees).filteredOn("name.first", "Luke")2854 * .containsOnly(luke);2855 *2856 * assertThat(employees).filteredOn("name.last", "Vader")2857 * .isEmpty();</code></pre>2858 * <p>2859 * If you want to filter on null value, use {@link #filteredOnNull(String)} as Java will resolve the call to2860 * {@link #filteredOn(String, FilterOperator)} instead of this method.2861 * <p>2862 * An {@link IntrospectionError} is thrown if the given propertyOrFieldName can't be found in one of the array2863 * elements.2864 * <p>2865 * You can chain filters:2866 * <pre><code class='java'> // fellowshipOfTheRing is an array of TolkienCharacter having race and name fields2867 * // 'not' filter is statically imported from Assertions.not2868 *2869 * assertThat(fellowshipOfTheRing).filteredOn("race.name", "Man")2870 * .filteredOn("name", not("Boromir"))2871 * .containsOnly(aragorn);</code></pre>2872 * <p>2873 * If you need more complex filter, use {@link #filteredOn(Condition)} or {@link #filteredOn(Predicate)} and2874 * provide a {@link Condition} or {@link Predicate} to specify the filter to apply.2875 *2876 * @param propertyOrFieldName the name of the property or field to read2877 * @param expectedValue the value to compare element's property or field with2878 * @return a new assertion object with the filtered list under test2879 * @throws IllegalArgumentException if the given propertyOrFieldName is {@code null} or empty.2880 * @throws IntrospectionError if the given propertyOrFieldName can't be found in one of the array elements.2881 */2882 @CheckReturnValue2883 public SELF filteredOn(String propertyOrFieldName, Object expectedValue) {2884 List<ELEMENT> filteredList = filter(actual).with(propertyOrFieldName, expectedValue).get();2885 return newObjectArrayAssert(filteredList);2886 }2887 /**2888 * Filter the array under test into a list composed of the elements whose property or field specified2889 * by {@code propertyOrFieldName} are null.2890 * <p>2891 * The filter first tries to get the value from a property (named {@code propertyOrFieldName}), if no such property2892 * exists it tries to read the value from a field. Reading private fields is supported by default, this can be2893 * globally disabled by calling {@link Assertions#setAllowExtractingPrivateFields(boolean)2894 * Assertions.setAllowExtractingPrivateFields(false)}.2895 * <p>2896 * When reading <b>nested</b> property/field, if an intermediate value is null the whole nested property/field is2897 * considered to be null, thus reading "address.street.name" value will return null if "street" value is null.2898 * <p>2899 * As an example, let's check all employees 800 years old (yes, special employees):2900 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);2901 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);2902 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);2903 * Employee noname = new Employee(4L, null, 50);2904 *2905 * Employee[] employees = new Employee[] { yoda, luke, obiwan, noname };2906 *2907 * assertThat(employees).filteredOnNull("name")2908 * .containsOnly(noname);</code></pre>2909 *2910 * Nested properties/fields are supported:2911 * <pre><code class='java'> // Name is bean class with 'first' and 'last' String properties2912 *2913 * assertThat(employees).filteredOnNull("name.last")2914 * .containsOnly(yoda, obiwan, noname);</code></pre>2915 *2916 * An {@link IntrospectionError} is thrown if the given propertyOrFieldName can't be found in one of the array2917 * elements.2918 *2919 * @param propertyOrFieldName the name of the property or field to read2920 * @return a new assertion object with the filtered list under test2921 * @throws IntrospectionError if the given propertyOrFieldName can't be found in one of the array elements.2922 */2923 @CheckReturnValue2924 public SELF filteredOnNull(String propertyOrFieldName) {2925 // can't call filteredOn(String propertyOrFieldName, null) as it does not work with soft assertions proxying2926 // mechanism, it would lead to double proxying which is not handle properly (improvements needed in our proxy mechanism)2927 List<ELEMENT> filteredList = filter(actual).with(propertyOrFieldName, null).get();2928 return newObjectArrayAssert(filteredList);2929 }2930 /**2931 * Filter the array under test into a list composed of elements having a property or field matching the filter expressed with2932 * the {@link FilterOperator}, the property/field is specified by {@code propertyOrFieldName} parameter.2933 * <p>2934 * The existing filters are :2935 * <ul>2936 * <li> {@link Assertions#not(Object) not(Object)}</li>2937 * <li> {@link Assertions#in(Object...) in(Object...)}</li>2938 * <li> {@link Assertions#notIn(Object...) notIn(Object...)}</li>2939 * </ul>2940 * <p>2941 * Whatever filter is applied, it first tries to get the value from a property (named {@code propertyOrFieldName}), if2942 * no such property exists it tries to read the value from a field. Reading private fields is supported by default,2943 * this can be globally disabled by calling {@link Assertions#setAllowExtractingPrivateFields(boolean)2944 * Assertions.setAllowExtractingPrivateFields(false)}.2945 * <p>2946 * When reading <b>nested</b> property/field, if an intermediate value is null the whole nested property/field is2947 * considered to be null, thus reading "address.street.name" value will return null if "street" value is null.2948 * <p>2949 * As an example, let's check stuff on some special employees :2950 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);2951 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);2952 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);2953 *2954 * Employee[] employees = new Employee[] { yoda, luke, obiwan, noname };2955 *2956 * // 'not' filter is statically imported from Assertions.not2957 * assertThat(employees).filteredOn("age", not(800))2958 * .containsOnly(luke);2959 *2960 * // 'in' filter is statically imported from Assertions.in2961 * // Name is bean class with 'first' and 'last' String properties2962 * assertThat(employees).filteredOn("name.first", in("Yoda", "Luke"))2963 * .containsOnly(yoda, luke);2964 *2965 * // 'notIn' filter is statically imported from Assertions.notIn2966 * assertThat(employees).filteredOn("name.first", notIn("Yoda", "Luke"))2967 * .containsOnly(obiwan);</code></pre>2968 *2969 * An {@link IntrospectionError} is thrown if the given propertyOrFieldName can't be found in one of the array2970 * elements.2971 * <p>2972 * Note that combining filter operators is not supported, thus the following code is not correct:2973 * <pre><code class='java'> // Combining filter operators like not(in(800)) is NOT supported2974 * // -&gt; throws UnsupportedOperationException2975 * assertThat(employees).filteredOn("age", not(in(800)))2976 * .contains(luke);</code></pre>2977 * <p>2978 * You can chain filters:2979 * <pre><code class='java'> // fellowshipOfTheRing is an array of TolkienCharacter having race and name fields2980 * // 'not' filter is statically imported from Assertions.not2981 *2982 * assertThat(fellowshipOfTheRing).filteredOn("race.name", "Man")2983 * .filteredOn("name", not("Boromir"))2984 * .containsOnly(aragorn);</code></pre>2985 * <p>2986 * If you need more complex filter, use {@link #filteredOn(Condition)} or {@link #filteredOn(Predicate)} and2987 * provide a {@link Condition} or {@link Predicate} to specify the filter to apply.2988 *2989 * @param propertyOrFieldName the name of the property or field to read2990 * @param filterOperator the filter operator to apply2991 * @return a new assertion object with the filtered list under test2992 * @throws IllegalArgumentException if the given propertyOrFieldName is {@code null} or empty.2993 */2994 @CheckReturnValue2995 public SELF filteredOn(String propertyOrFieldName, FilterOperator<?> filterOperator) {2996 checkNotNull(filterOperator);2997 Filters<ELEMENT> filter = filter(actual).with(propertyOrFieldName);2998 filterOperator.applyOn(filter);2999 return newObjectArrayAssert(filter.get());3000 }3001 /**3002 * Filter the array under test into a list composed of the elements matching the given {@link Condition},3003 * allowing to perform assertions on the filtered list.3004 * <p>3005 * Let's check old employees whose age &gt; 100:3006 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);3007 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);3008 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);3009 * Employee noname = new Employee(4L, null, 50);3010 *3011 * Employee[] employees = new Employee[] { yoda, luke, obiwan, noname };3012 *3013 * // old employee condition, "old employees" describes the condition in error message3014 * // you just have to implement 'matches' method3015 * Condition&lt;Employee&gt; oldEmployees = new Condition&lt;Employee&gt;("old employees") {3016 * {@literal @}Override3017 * public boolean matches(Employee employee) {3018 * return employee.getAge() &gt; 100;3019 * }3020 * };3021 * }3022 * assertThat(employees).filteredOn(oldEmployees)3023 * .containsOnly(yoda, obiwan);</code></pre>3024 *3025 * You can combine {@link Condition} with condition operator like {@link Not}:3026 * <pre><code class='java'> // 'not' filter is statically imported from Assertions.not3027 * assertThat(employees).filteredOn(not(oldEmployees))3028 * .contains(luke, noname);</code></pre>3029 *3030 * @param condition the filter condition / predicate3031 * @return a new assertion object with the filtered list under test3032 * @throws IllegalArgumentException if the given condition is {@code null}.3033 */3034 @CheckReturnValue3035 public SELF filteredOn(Condition<? super ELEMENT> condition) {3036 List<ELEMENT> filteredList = filter(actual).being(condition).get();3037 return newObjectArrayAssert(filteredList);3038 }3039 /**3040 * Filter the array under test into a list composed of the elements matching the given {@link Predicate},3041 * allowing to perform assertions on the filtered list.3042 * <p>3043 * Example : check old employees whose age &gt; 100:3044 *3045 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);3046 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);3047 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);3048 *3049 * Employee[] employees = new Employee[] { yoda, luke, obiwan };3050 *3051 * assertThat(employees).filteredOn(employee -&gt; employee.getAge() &gt; 100)3052 * .containsOnly(yoda, obiwan);</code></pre>3053 *3054 * @param predicate the filter predicate3055 * @return a new assertion object with the filtered list under test3056 * @throws IllegalArgumentException if the given predicate is {@code null}.3057 */3058 public SELF filteredOn(Predicate<? super ELEMENT> predicate) {3059 return internalFilteredOn(predicate);3060 }3061 /**3062 * Filter the array under test into a list composed of the elements for which the result of the {@code function} is equal to {@code expectedValue}.3063 * <p>3064 * It allows to filter elements in more safe way than by using {@link #filteredOn(String, Object)} as it doesn't utilize introspection.3065 * <p>3066 * As an example, let's check all employees 800 years old (yes, special employees):3067 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);3068 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);3069 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);3070 * Employee noname = new Employee(4L, null, 50);3071 *3072 * Employee[] employees = new Employee[] { yoda, luke, obiwan, noname };3073 *3074 * assertThat(employees).filteredOn(Employee::getAge, 800)3075 * .containsOnly(yoda, obiwan);3076 *3077 * assertThat(employees).filteredOn(e -&gt; e.getName(), null)3078 * .containsOnly(noname);</code></pre>3079 *3080 * If you need more complex filter, use {@link #filteredOn(Predicate)} or {@link #filteredOn(Condition)}.3081 *3082 * @param <T> result type of the filter function3083 * @param function the filter function3084 * @param expectedValue the expected value of the filter function3085 * @return a new assertion object with the filtered list under test3086 * @throws IllegalArgumentException if the given function is {@code null}.3087 * @since 3.17.03088 */3089 @CheckReturnValue3090 public <T> SELF filteredOn(Function<? super ELEMENT, T> function, T expectedValue) {3091 checkArgument(function != null, "The filter function should not be null");3092 // call internalFilteredOn to avoid double proxying in soft assertions3093 return internalFilteredOn(element -> java.util.Objects.equals(function.apply(element), expectedValue));3094 }3095 /**3096 * Filter the array under test keeping only elements matching the given assertions specified with a {@link Consumer}.3097 * <p>3098 * Example : check old employees whose age &gt; 100:3099 *3100 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);3101 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);3102 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);3103 *3104 * Employee[] employees = new Employee[] { yoda, luke, obiwan };3105 *3106 * assertThat(employees).filteredOnAssertions(employee -&gt; assertThat(employee.getAge()).isGreaterThan(100))3107 * .containsOnly(yoda, obiwan);</code></pre>3108 *3109 * @param elementAssertions containing AssertJ assertions to filter on3110 * @return a new assertion object with the filtered iterable under test3111 * @throws IllegalArgumentException if the given predicate is {@code null}.3112 * @since 3.11.03113 */3114 public SELF filteredOnAssertions(Consumer<? super ELEMENT> elementAssertions) {3115 return internalFilteredOnAssertions(elementAssertions);3116 }3117 /**3118 * Filter the array under test keeping only elements matching the given assertions specified with a {@link Consumer}.3119 * <p>3120 * Example : check old employees whose age &gt; 100:3121 *3122 * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800);3123 * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800);3124 * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);3125 *3126 * Employee[] employees = new Employee[] { yoda, luke, obiwan };3127 * 3128 * // compiles even if getAge() throws a checked exception unlike filteredOnAssertions(Consumer)3129 * assertThat(employees).filteredOnAssertions(employee -&gt; assertThat(employee.getAge()).isGreaterThan(100))3130 * .containsOnly(yoda, obiwan);</code></pre>3131 *3132 * @param elementAssertions containing AssertJ assertions to filter on3133 * @return a new assertion object with the filtered iterable under test3134 * @throws IllegalArgumentException if the given predicate is {@code null}.3135 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3136 * @since 3.21.03137 */3138 public SELF filteredOnAssertions(ThrowingConsumer<? super ELEMENT> elementAssertions) {3139 return internalFilteredOnAssertions(elementAssertions);3140 }3141 private SELF internalFilteredOnAssertions(Consumer<? super ELEMENT> elementAssertions) {3142 checkArgument(elementAssertions != null, "The element assertions should not be null");3143 List<ELEMENT> filteredIterable = stream(actual).filter(byPassingAssertions(elementAssertions)).collect(toList());3144 return newObjectArrayAssert(filteredIterable).withAssertionState(myself);3145 }3146 /**3147 * Verifies that all elements match the given {@link Predicate}.3148 * <p>3149 * Example :3150 * <pre><code class='java'> String[] abc = {"a", "b", "c"};3151 * String[] abcc = {"a", "b", "cc"};3152 *3153 * // assertion will pass3154 * assertThat(abc).allMatch(s -&gt; s.length() == 1);3155 *3156 * // assertion will fail3157 * assertThat(abcc).allMatch(s -&gt; s.length() == 1);</code></pre>3158 *3159 * Note that you can achieve the same result with {@link #are(Condition) are(Condition)} or {@link #have(Condition) have(Condition)}.3160 *3161 * @param predicate the given {@link Predicate}.3162 * @return {@code this} object.3163 * @throws NullPointerException if the given predicate is {@code null}.3164 * @throws AssertionError if an element cannot be cast to ELEMENT.3165 * @throws AssertionError if one or more elements don't satisfy the given predicate.3166 */3167 @Override3168 public SELF allMatch(Predicate<? super ELEMENT> predicate) {3169 iterables.assertAllMatch(info, newArrayList(actual), predicate, PredicateDescription.GIVEN);3170 return myself;3171 }3172 /**3173 * {@inheritDoc}3174 */3175 @Override3176 public SELF allMatch(Predicate<? super ELEMENT> predicate, String predicateDescription) {3177 iterables.assertAllMatch(info, newArrayList(actual), predicate, new PredicateDescription(predicateDescription));3178 return myself;3179 }3180 /**3181 * {@inheritDoc}3182 */3183 @Override3184 public SELF allSatisfy(Consumer<? super ELEMENT> requirements) {3185 return internalAllSatisfy(requirements);3186 }3187 /**3188 * Verifies that all the elements satisfy the given requirements expressed as a {@link ThrowingConsumer}.3189 * <p>3190 * This is useful to perform a group of assertions on elements.3191 * <p>3192 * This is the same assertion as {@link #allSatisfy(Consumer)} but the given consumer can throw checked exceptions.<br>3193 * More precisely, {@link RuntimeException} and {@link AssertionError} are rethrown as they are and {@link Throwable} wrapped in a {@link RuntimeException}. 3194 * <p>3195 * Example:3196 * <pre><code class='java'> // read() throws IOException3197 * // note that the code would not compile if isNotEmpty, startsWithA or startsWithZ were declared as a Consumer&lt;Reader&gt; 3198 * ThrowingConsumer&lt;Reader&gt; isNotEmpty = reader -&gt; assertThat(reader.read()).isEqualTo(-1);3199 * ThrowingConsumer&lt;Reader&gt; startsWithA = reader -&gt; assertThat(reader.read()).isEqualTo('A');3200 *3201 * // ABC.txt contains: ABC 3202 * // XYZ.txt contains: XYZ 3203 * FileReader[] readers = { new FileReader("ABC.txt"), new FileReader("XYZ.txt") }; 3204 * 3205 * // assertion succeeds as none of the files are empty3206 * assertThat(readers).allSatisfy(isNotEmpty);3207 *3208 * // assertion fails as XYZ.txt does not start with 'A':3209 * assertThat(readers).allSatisfy(startsWithA);</code></pre>3210 * <p>3211 * If the actual array is empty, this assertion succeeds as there is nothing to check.3212 *3213 * @param requirements the given {@link ThrowingConsumer}.3214 * @return {@code this} object.3215 * @throws NullPointerException if given {@link ThrowingConsumer} is null3216 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3217 * @throws AssertionError if one or more elements don't satisfy the given requirements.3218 * @since 3.21.03219 */3220 @Override3221 public SELF allSatisfy(ThrowingConsumer<? super ELEMENT> requirements) {3222 return internalAllSatisfy(requirements);3223 }3224 private SELF internalAllSatisfy(Consumer<? super ELEMENT> requirements) {3225 iterables.assertAllSatisfy(info, newArrayList(actual), requirements);3226 return myself;3227 }3228 /**3229 * Verifies whether any elements match the provided {@link Predicate}.3230 * <p>3231 * Example :3232 * <pre><code class='java'> String[] abcc = { "a", "b", "cc" };3233 *3234 * // assertion will pass3235 * assertThat(abc).anyMatch(s -&gt; s.length() == 2);3236 *3237 * // assertion will fail3238 * assertThat(abcc).anyMatch(s -&gt; s.length() &gt; 2);</code></pre>3239 *3240 * Note that you can achieve the same result with {@link #areAtLeastOne(Condition) areAtLeastOne(Condition)}3241 * or {@link #haveAtLeastOne(Condition) haveAtLeastOne(Condition)}.3242 *3243 * @param predicate the given {@link Predicate}.3244 * @return {@code this} object.3245 * @throws NullPointerException if the given predicate is {@code null}.3246 * @throws AssertionError if no elements satisfy the given predicate.3247 * @since 3.9.03248 */3249 @Override3250 public SELF anyMatch(Predicate<? super ELEMENT> predicate) {3251 iterables.assertAnyMatch(info, newArrayList(actual), predicate, PredicateDescription.GIVEN);3252 return myself;3253 }3254 /**3255 * Verifies that the zipped pairs of actual and other elements, i.e: (actual 1st element, other 1st element), (actual 2nd element, other 2nd element), ...3256 * all satisfy the given {@code zipRequirements}.3257 * <p>3258 * This assertion assumes that actual and other have the same size but they can contain different type of elements3259 * making it handy to compare objects converted to another type, for example Domain and View/DTO objects.3260 * <p>3261 * Example:3262 * <pre><code class='java'> Adress[] addressModels = findGoodRestaurants();3263 * AdressView[] addressViews = convertToView(addressModels);3264 *3265 * // compare addressViews and addressModels respective paired elements.3266 * assertThat(addressViews).zipSatisfy(addressModels, (AdressView view, Adress model) -&gt; {3267 * assertThat(view.getZipcode() + ' ' + view.getCity()).isEqualTo(model.getCityLine());3268 * assertThat(view.getStreet()).isEqualTo(model.getStreet().toUpperCase());3269 * });</code></pre>3270 *3271 * @param <OTHER_ELEMENT> the type of the other array elements.3272 * @param other the array to zip actual with.3273 * @param zipRequirements the given requirements that each pair must satisfy.3274 * @return {@code this} assertion object.3275 * @throws NullPointerException if the given zipRequirements {@link BiConsumer} is {@code null}.3276 * @throws NullPointerException if the other array to zip actual with is {@code null}.3277 * @throws AssertionError if the array under test is {@code null}.3278 * @throws AssertionError if actual and other don't have the same size.3279 * @throws AssertionError if one or more pairs don't satisfy the given requirements.3280 * @since 3.9.03281 */3282 public <OTHER_ELEMENT> SELF zipSatisfy(OTHER_ELEMENT[] other,3283 BiConsumer<? super ELEMENT, OTHER_ELEMENT> zipRequirements) {3284 iterables.assertZipSatisfy(info, newArrayList(actual), newArrayList(other), zipRequirements);3285 return myself;3286 }3287 /**3288 * {@inheritDoc}3289 */3290 @Override3291 public SELF anySatisfy(Consumer<? super ELEMENT> requirements) {3292 return internalAnySatisfy(requirements);3293 }3294 /**3295 * Verifies that at least one element satisfies the given requirements expressed as a {@link ThrowingConsumer}.3296 * <p>3297 * This is useful to check that a group of assertions is verified by (at least) one element.3298 * <p>3299 * This is the same assertion as {@link #anySatisfy(Consumer)} but the given consumer can throw checked exceptions.<br>3300 * More precisely, {@link RuntimeException} and {@link AssertionError} are rethrown as they are and {@link Throwable} wrapped in a {@link RuntimeException}. 3301 * <p>3302 * Example:3303 * <pre><code class='java'> // read() throws IOException3304 * // note that the code would not compile if startsWithA, startsWithY or startsWithZ were declared as a Consumer&lt;Reader&gt; 3305 * ThrowingConsumer&lt;Reader&gt; startsWithA = reader -&gt; assertThat(reader.read()).isEqualTo('A');3306 * ThrowingConsumer&lt;Reader&gt; startsWithZ = reader -&gt; assertThat(reader.read()).isEqualTo('Z');3307 *3308 * // ABC.txt contains: ABC 3309 * // XYZ.txt contains: XYZ 3310 * FileReader[] readers = { new FileReader("ABC.txt"), new FileReader("XYZ.txt") };3311 * 3312 * // assertion succeeds as ABC.txt starts with 'A'3313 * assertThat(readers).anySatisfy(startsWithA);3314 *3315 * // assertion fails none of the files starts with 'Z':3316 * assertThat(readers).anySatisfy(startsWithZ);</code></pre>3317 * <p>3318 * If the actual array is empty, this assertion succeeds as there is nothing to check.3319 *3320 * @param requirements the given {@link ThrowingConsumer}.3321 * @return {@code this} object.3322 * @throws NullPointerException if given {@link ThrowingConsumer} is null3323 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3324 * @throws AssertionError no elements satisfy the given requirements.3325 * @since 3.21.03326 */3327 @Override3328 public SELF anySatisfy(ThrowingConsumer<? super ELEMENT> requirements) {3329 return internalAnySatisfy(requirements);3330 }3331 private SELF internalAnySatisfy(Consumer<? super ELEMENT> requirements) {3332 iterables.assertAnySatisfy(info, newArrayList(actual), requirements);3333 return myself;3334 }3335 /**3336 * {@inheritDoc}3337 */3338 @Override3339 public SELF noneSatisfy(Consumer<? super ELEMENT> restrictions) {3340 return internalNoneSatisfy(restrictions);3341 }3342 /**3343 * Verifies that no elements satisfy the given restrictions expressed as a {@link Consumer}.3344 * <p>3345 * This is useful to check that a group of assertions is verified by (at least) one element.3346 * <p>3347 * This is the same assertion as {@link #anySatisfy(Consumer)} but the given consumer can throw checked exceptions.<br>3348 * More precisely, {@link RuntimeException} and {@link AssertionError} are rethrown as they are and {@link Throwable} wrapped in a {@link RuntimeException}. 3349 * <p>3350 * Example:3351 * <pre><code class='java'> // read() throws IOException3352 * // note that the code would not compile if startsWithA, startsWithY or startsWithZ were declared as a Consumer&lt;Reader&gt; 3353 * ThrowingConsumer&lt;Reader&gt; startsWithA = reader -&gt; assertThat(reader.read()).isEqualTo('A');3354 * ThrowingConsumer&lt;Reader&gt; startsWithZ = reader -&gt; assertThat(reader.read()).isEqualTo('Z');3355 *3356 * // ABC.txt contains: ABC 3357 * // XYZ.txt contains: XYZ 3358 * FileReader[] readers = { new FileReader("ABC.txt"), new FileReader("XYZ.txt") }; 3359 * 3360 * // assertion succeeds as none of the file starts 'Z'3361 * assertThat(readers).noneSatisfy(startsWithZ);3362 *3363 * // assertion fails as ABC.txt starts with 'A':3364 * assertThat(readers).noneSatisfy(startsWithA);</code></pre>3365 * <p>3366 * Note that this assertion succeeds if the group (collection, array, ...) is empty whatever the restrictions are.3367 *3368 * @param restrictions the given {@link ThrowingConsumer}.3369 * @return {@code this} object.3370 * @throws NullPointerException if given {@link ThrowingConsumer} is null3371 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3372 * @throws AssertionError if one or more elements satisfy the given requirements.3373 * @since 3.21.03374 */3375 @Override3376 public SELF noneSatisfy(ThrowingConsumer<? super ELEMENT> restrictions) {3377 return internalNoneSatisfy(restrictions);3378 }3379 private SELF internalNoneSatisfy(Consumer<? super ELEMENT> restrictions) {3380 iterables.assertNoneSatisfy(info, newArrayList(actual), restrictions);3381 return myself;3382 }3383 /**3384 * Verifies that each element satisfies the requirements corresponding to its index, so the first element must satisfy the3385 * first requirements, the second element the second requirements etc...3386 * <p>3387 * Each requirements are expressed as a {@link Consumer}, there must be as many requirements as there are iterable elements.3388 * <p>3389 * Example:3390 * <pre><code class='java'> TolkienCharacter[] characters = {frodo, aragorn, legolas};3391 *3392 * // assertions succeed3393 * assertThat(characters).satisfiesExactly(character -&gt; assertThat(character.getRace()).isEqualTo("Hobbit"),3394 * character -&gt; assertThat(character.isMortal()).isTrue(),3395 * character -&gt; assertThat(character.getName()).isEqualTo("Legolas"));3396 *3397 * // you can specify more that one assertion per requirements3398 * assertThat(characters).satisfiesExactly(character -&gt; {3399 * assertThat(character.getRace()).isEqualTo("Hobbit");3400 * assertThat(character.getName()).isEqualTo("Frodo");3401 * },3402 * character -&gt; {3403 * assertThat(character.isMortal()).isTrue();3404 * assertThat(character.getName()).isEqualTo("Aragorn");3405 * },3406 * character -&gt; {3407 * assertThat(character.getRace()).isEqualTo("Elf");3408 * assertThat(character.getName()).isEqualTo("Legolas");3409 * });3410 *3411 * // assertion fails as aragorn does not meet the second requirements3412 * assertThat(characters).satisfiesExactly(character -&gt; assertThat(character.getRace()).isEqualTo("Hobbit"),3413 * character -&gt; assertThat(character.isMortal()).isFalse(),3414 * character -&gt; assertThat(character.getName()).isEqualTo("Legolas"));</code></pre>3415 *3416 * @param requirements the requirements to meet.3417 * @return {@code this} to chain assertions.3418 * @throws NullPointerException if given requirements are null.3419 * @throws AssertionError if any element does not satisfy the requirements at the same index3420 * @throws AssertionError if there are not as many requirements as there are iterable elements.3421 * @since 3.19.03422 */3423 @Override3424 @SafeVarargs3425 public final SELF satisfiesExactly(Consumer<? super ELEMENT>... requirements) {3426 return satisfiesExactlyForProxy(requirements);3427 }3428 /**3429 * Verifies that each element satisfies the requirements corresponding to its index, so the first element must satisfy the3430 * first requirements, the second element the second requirements etc...3431 * <p>3432 * Each requirements are expressed as a {@link ThrowingConsumer}, there must be as many requirements as there are iterable elements.3433 * <p>3434 * This is the same assertion as {@link #satisfiesExactly(Consumer...)} but the given consumers can throw checked exceptions.<br>3435 * More precisely, {@link RuntimeException} and {@link AssertionError} are rethrown as they are and {@link Throwable} wrapped in a {@link RuntimeException}. 3436 * <p>3437 * Example:3438 * <pre><code class='java'> TolkienCharacter[] characters = {frodo, aragorn, legolas};3439 * 3440 * // the code would compile even if TolkienCharacter.getRace(), isMortal() or getName() threw a checked exception3441 *3442 * // assertions succeed3443 * assertThat(characters).satisfiesExactly(character -&gt; assertThat(character.getRace()).isEqualTo("Hobbit"),3444 * character -&gt; assertThat(character.isMortal()).isTrue(),3445 * character -&gt; assertThat(character.getName()).isEqualTo("Legolas"));3446 *3447 * // you can specify more that one assertion per requirements3448 * assertThat(characters).satisfiesExactly(character -&gt; {3449 * assertThat(character.getRace()).isEqualTo("Hobbit");3450 * assertThat(character.getName()).isEqualTo("Frodo");3451 * },3452 * character -&gt; {3453 * assertThat(character.isMortal()).isTrue();3454 * assertThat(character.getName()).isEqualTo("Aragorn");3455 * },3456 * character -&gt; {3457 * assertThat(character.getRace()).isEqualTo("Elf");3458 * assertThat(character.getName()).isEqualTo("Legolas");3459 * });3460 *3461 * // assertion fails as aragorn does not meet the second requirements3462 * assertThat(characters).satisfiesExactly(character -&gt; assertThat(character.getRace()).isEqualTo("Hobbit"),3463 * character -&gt; assertThat(character.isMortal()).isFalse(),3464 * character -&gt; assertThat(character.getName()).isEqualTo("Legolas"));</code></pre>3465 *3466 * @param requirements the requirements to meet.3467 * @return {@code this} to chain assertions.3468 * @throws NullPointerException if given requirements are null.3469 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3470 * @throws AssertionError if any element does not satisfy the requirements at the same index3471 * @throws AssertionError if there are not as many requirements as there are iterable elements.3472 * @since 3.21.03473 */3474 @Override3475 @SafeVarargs3476 public final SELF satisfiesExactly(ThrowingConsumer<? super ELEMENT>... requirements) {3477 return satisfiesExactlyForProxy(requirements);3478 }3479 // This method is protected in order to be proxied for SoftAssertions / Assumptions.3480 // The public method for it (the one not ending with "ForProxy") is marked as final and annotated with @SafeVarargs3481 // in order to avoid compiler warning in user code3482 protected SELF satisfiesExactlyForProxy(Consumer<? super ELEMENT>[] requirements) {3483 iterables.assertSatisfiesExactly(info, newArrayList(actual), requirements);3484 return myself;3485 }3486 /**3487 * Verifies that at least one combination of iterable elements exists that satisfies the consumers in order (there must be as3488 * many consumers as iterable elements and once a consumer is matched it cannot be reused to match other elements).3489 * <p>3490 * This is a variation of {@link #satisfiesExactly(Consumer...)} where order does not matter.3491 * <p>3492 * Examples:3493 * <pre><code class='java'> String[] starWarsCharacterNames = {"Luke", "Leia", "Yoda"};3494 *3495 * // these assertions succeed:3496 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"), // matches "Yoda"3497 * name -&gt; assertThat(name).contains("L"), // matches "Luke" and "Leia"3498 * name -&gt; {3499 * assertThat(name).hasSize(4);3500 * assertThat(name).doesNotContain("a"); // matches "Luke" but not "Leia"3501 * })3502 * .satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Yo"),3503 * name -&gt; assertThat(name).contains("Lu"),3504 * name -&gt; assertThat(name).contains("Le"))3505 * .satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Le"),3506 * name -&gt; assertThat(name).contains("Yo"),3507 * name -&gt; assertThat(name).contains("Lu"));3508 *3509 * // this assertion fails as 3 consumer/requirements are expected3510 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"),3511 * name -&gt; assertThat(name).contains("L"));3512 *3513 * // this assertion fails as no element contains "Han" (first consumer/requirements can't be met)3514 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Han"),3515 * name -&gt; assertThat(name).contains("L"),3516 * name -&gt; assertThat(name).contains("Y"));3517 *3518 * // this assertion fails as "Yoda" element can't satisfy any consumers/requirements (even though all consumers/requirements are met)3519 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("L"),3520 * name -&gt; assertThat(name).contains("L"),3521 * name -&gt; assertThat(name).contains("L"));3522 *3523 * // this assertion fails as no combination of elements can satisfy the consumers in order3524 * // the problem is if the last consumer is matched by Leia then no other consumer can match Luke (and vice versa)3525 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"),3526 * name -&gt; assertThat(name).contains("o"),3527 * name -&gt; assertThat(name).contains("L"));</code></pre>3528 *3529 * @param requirements the consumers that are expected to be satisfied by the elements of the given {@code Iterable}.3530 * @return this assertion object.3531 * @throws NullPointerException if the given consumers array or any consumer is {@code null}.3532 * @throws AssertionError if there is no permutation of elements that satisfies the individual consumers in order3533 * @throws AssertionError if there are not as many requirements as there are iterable elements.3534 *3535 * @since 3.19.03536 */3537 @Override3538 @SafeVarargs3539 public final SELF satisfiesExactlyInAnyOrder(Consumer<? super ELEMENT>... requirements) {3540 return satisfiesExactlyInAnyOrderForProxy(requirements);3541 }3542 /**3543 * Verifies that at least one combination of iterable elements exists that satisfies the {@link ThrowingConsumer}s in order (there must be as3544 * many consumers as iterable elements and once a consumer is matched it cannot be reused to match other elements).3545 * <p>3546 * This is a variation of {@link #satisfiesExactly(ThrowingConsumer...)} where order does not matter.3547 * <p>3548 * Examples:3549 * <pre><code class='java'> String[] starWarsCharacterNames = {"Luke", "Leia", "Yoda"};3550 *3551 * // these assertions succeed:3552 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"), // matches "Yoda"3553 * name -&gt; assertThat(name).contains("L"), // matches "Luke" and "Leia"3554 * name -&gt; {3555 * assertThat(name).hasSize(4);3556 * assertThat(name).doesNotContain("a"); // matches "Luke" but not "Leia"3557 * })3558 * .satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Yo"),3559 * name -&gt; assertThat(name).contains("Lu"),3560 * name -&gt; assertThat(name).contains("Le"))3561 * .satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Le"),3562 * name -&gt; assertThat(name).contains("Yo"),3563 * name -&gt; assertThat(name).contains("Lu"));3564 *3565 * // this assertion fails as 3 consumers/requirements are expected3566 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"),3567 * name -&gt; assertThat(name).contains("L"));3568 *3569 * // this assertion fails as no element contains "Han" (first consumer/requirements can't be met)3570 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Han"),3571 * name -&gt; assertThat(name).contains("L"),3572 * name -&gt; assertThat(name).contains("Y"));3573 *3574 * // this assertion fails as "Yoda" element can't satisfy any consumers/requirements (even though all consumers/requirements are met)3575 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("L"),3576 * name -&gt; assertThat(name).contains("L"),3577 * name -&gt; assertThat(name).contains("L"));3578 *3579 * // this assertion fails as no combination of elements can satisfy the consumers in order3580 * // the problem is if the last consumer is matched by Leia then no other consumer can match Luke (and vice versa)3581 * assertThat(starWarsCharacterNames).satisfiesExactlyInAnyOrder(name -&gt; assertThat(name).contains("Y"),3582 * name -&gt; assertThat(name).contains("o"),3583 * name -&gt; assertThat(name).contains("L"));</code></pre>3584 *3585 * @param requirements the consumers that are expected to be satisfied by the elements of the given {@code Iterable}.3586 * @return this assertion object.3587 * @throws NullPointerException if the given consumers array or any consumer is {@code null}.3588 * @throws RuntimeException rethrown as is by the given {@link ThrowingConsumer} or wrapping any {@link Throwable}. 3589 * @throws AssertionError if there is no permutation of elements that satisfies the individual consumers in order3590 * @throws AssertionError if there are not as many requirements as there are iterable elements.3591 * @since 3.21.03592 */3593 @Override3594 @SafeVarargs3595 public final SELF satisfiesExactlyInAnyOrder(ThrowingConsumer<? super ELEMENT>... requirements) {3596 return satisfiesExactlyInAnyOrderForProxy(requirements);3597 }3598 // This method is protected in order to be proxied for SoftAssertions / Assumptions.3599 // The public method for it (the one not ending with "ForProxy") is marked as final and annotated with @SafeVarargs3600 // in order to avoid compiler warning in user code3601 protected SELF satisfiesExactlyInAnyOrderForProxy(Consumer<? super ELEMENT>[] requirements) {3602 iterables.assertSatisfiesExactlyInAnyOrder(info, newArrayList(actual), requirements);3603 return myself;3604 }3605 /**3606 * Verifies that the actual array contains at least one of the given values.3607 * <p>3608 * Example :3609 * <pre><code class='java'> String[] abc = {"a", "b", "c"};3610 *3611 * // assertions will pass3612 * assertThat(abc).containsAnyOf("b")3613 * .containsAnyOf("b", "c")3614 * .containsAnyOf("a", "b", "c")3615 * .containsAnyOf("a", "b", "c", "d")3616 * .containsAnyOf("e", "f", "g", "b");3617 *3618 * // assertions will fail3619 * assertThat(abc).containsAnyOf("d");3620 * assertThat(abc).containsAnyOf("d", "e", "f", "g");</code></pre>3621 *3622 * @param values the values whose at least one which is expected to be in the array under test.3623 * @return {@code this} assertion object.3624 * @throws NullPointerException if the array of values is {@code null}.3625 * @throws IllegalArgumentException if the array of values is empty and the array under test is not empty.3626 * @throws AssertionError if the array under test is {@code null}.3627 * @throws AssertionError if the array under test does not contain any of the given {@code values}.3628 * @since 2.9.0 / 3.9.03629 */3630 @Override3631 @SafeVarargs3632 public final SELF containsAnyOf(ELEMENT... values) {3633 return containsAnyOfForProxy(values);3634 }3635 // This method is protected in order to be proxied for SoftAssertions / Assumptions.3636 // The public method for it (the one not ending with "ForProxy") is marked as final and annotated with @SafeVarargs3637 // in order to avoid compiler warning in user code3638 protected SELF containsAnyOfForProxy(ELEMENT[] values) {3639 arrays.assertContainsAnyOf(info, actual, values);3640 return myself;3641 }3642 /**3643 * Verifies that the actual array contains at least one of the given {@link Iterable} elements.3644 * <p>3645 * Example :3646 * <pre><code class='java'> String[] abc = {"a", "b", "c"};3647 *3648 * // assertions will pass3649 * assertThat(abc).containsAnyElementsOf(Arrays.asList("b"))3650 * .containsAnyElementsOf(Arrays.asList("b", "c"))3651 * .containsAnyElementsOf(Arrays.asList("a", "b", "c"))3652 * .containsAnyElementsOf(Arrays.asList("a", "b", "c", "d"))3653 * .containsAnyElementsOf(Arrays.asList("e", "f", "g", "b"));3654 *3655 * // assertions will fail3656 * assertThat(abc).containsAnyElementsOf(Arrays.asList("d"));3657 * assertThat(abc).containsAnyElementsOf(Arrays.asList("d", "e", "f", "g"));</code></pre>3658 *3659 * @param iterable the iterable whose at least one element is expected to be in the array under test.3660 * @return {@code this} assertion object.3661 * @throws NullPointerException if the iterable of expected values is {@code null}.3662 * @throws IllegalArgumentException if the iterable of expected values is empty and the array under test is not empty.3663 * @throws AssertionError if the array under test is {@code null}.3664 * @throws AssertionError if the array under test does not contain any of elements from the given {@code Iterable}.3665 * @since 2.9.0 / 3.9.03666 */3667 @Override3668 public SELF containsAnyElementsOf(Iterable<? extends ELEMENT> iterable) {3669 return containsAnyOf(toArray(iterable));3670 }3671 /**3672 * Verifies that no elements match the given {@link Predicate}.3673 * <p>3674 * Example :3675 * <pre><code class='java'> String[] abcc = { "a", "b", "cc" };3676 *3677 * // assertion will pass3678 * assertThat(abcc).noneMatch(s -&gt; s.isEmpty());3679 *3680 * // assertion will fail3681 * assertThat(abcc).noneMatch(s -&gt; s.length() == 2);</code></pre>3682 *3683 * Note that you can achieve the same result with {@link #areNot(Condition) areNot(Condition)}3684 * or {@link #doNotHave(Condition) doNotHave(Condition)}.3685 *3686 * @param predicate the given {@link Predicate}.3687 * @return {@code this} object.3688 * @throws NullPointerException if the given predicate is {@code null}.3689 * @throws AssertionError if an element cannot be cast to ELEMENT.3690 * @throws AssertionError if any element satisfy the given predicate.3691 * @since 3.9.03692 */3693 @Override3694 public SELF noneMatch(Predicate<? super ELEMENT> predicate) {3695 iterables.assertNoneMatch(info, newArrayList(actual), predicate, PredicateDescription.GIVEN);3696 return myself;3697 }3698 /**3699 * Create a friendly soft or "hard" assertion.3700 * <p>3701 * Implementations need to redefine either to be proxy friendly (i.e. no final assertion methods)3702 * or generic vararg friendly (to use {@link SafeVarargs} annotation which requires final method).3703 * <p>3704 * The default implementation will assume that this concrete implementation is NOT a soft assertion.3705 *3706 * @param <E> the type of elements.3707 * @param newActual new value3708 * @return a new {@link AbstractListAssert}.3709 */3710 @Override3711 protected <E> AbstractListAssert<?, List<? extends E>, E, ObjectAssert<E>> newListAssertInstance(List<? extends E> newActual) {3712 return new ListAssert<>(newActual);3713 }3714 /**3715 * Enable using a recursive field by field comparison strategy when calling the chained {@link RecursiveComparisonAssert},3716 * <p>3717 * Example:3718 * <pre><code class='java'> public class Person {3719 * String name;3720 * boolean hasPhd;3721 * }3722 *3723 * public class Doctor {3724 * String name;3725 * boolean hasPhd;3726 * }3727 *3728 * Doctor drSheldon = new Doctor("Sheldon Cooper", true);3729 * Doctor drLeonard = new Doctor("Leonard Hofstadter", true);3730 * Doctor drRaj = new Doctor("Raj Koothrappali", true);3731 *3732 * Person sheldon = new Person("Sheldon Cooper", true);3733 * Person leonard = new Person("Leonard Hofstadter", true);3734 * Person raj = new Person("Raj Koothrappali", true);3735 * Person howard = new Person("Howard Wolowitz", false);3736 *3737 * Doctor[] doctors = { drSheldon, drLeonard, drRaj };3738 * Person[] people = { sheldon, leonard, raj };3739 *3740 * // assertion succeeds as both lists contains equivalent items in order.3741 * assertThat(doctors).usingRecursiveComparison()3742 * .isEqualTo(people);3743 *3744 * // assertion fails because leonard names are different.3745 * leonard.setName("Leonard Ofstater");3746 * assertThat(doctors).usingRecursiveComparison()3747 * .isEqualTo(people);3748 *3749 * // assertion fails because howard is missing and leonard is not expected.3750 * Person[] otherPeople = { howard, sheldon, raj };3751 * assertThat(doctors).usingRecursiveComparison()3752 * .isEqualTo(otherPeople);</code></pre>3753 *3754 * A detailed documentation for the recursive comparison is available here: <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison">https://assertj.github.io/doc/#assertj-core-recursive-comparison</a>.3755 * <p>3756 * The default recursive comparison behavior is {@link RecursiveComparisonConfiguration configured} as follows:3757 * <ul>3758 * <li> different types of iterable can be compared by default, this allows to compare for example an {@code Person[]} and a {@code PersonDto[]}.<br>3759 * This behavior can be turned off by calling {@link RecursiveComparisonAssert#withStrictTypeChecking() withStrictTypeChecking}.</li>3760 * <li>overridden equals methods are used in the comparison (unless stated otherwise - see <a href="https://assertj.github.io/doc/#assertj-core-recursive-comparison-ignoring-equals">https://assertj.github.io/doc/#assertj-core-recursive-comparison-ignoring-equals</a>)</li>3761 * <li>the following types are compared with these comparators:3762 * <ul>3763 * <li>{@code java.lang.Double}: {@code DoubleComparator} with precision of 1.0E-15</li>3764 * <li>{@code java.lang.Float}: {@code FloatComparator }with precision of 1.0E-6</li>3765 * <li>any comparators previously registered with {@link AbstractIterableAssert#usingComparatorForType(Comparator, Class)} </li>3766 * </ul>3767 * </li>3768 * </ul>3769 *3770 * @return a new {@link RecursiveComparisonAssert} instance3771 * @see RecursiveComparisonConfiguration RecursiveComparisonConfiguration3772 */3773 @Override3774 @Beta3775 public RecursiveComparisonAssert<?> usingRecursiveComparison() {3776 // overridden for javadoc and to make this method public3777 return super.usingRecursiveComparison();3778 }3779 /**3780 * Same as {@link #usingRecursiveComparison()} but allows to specify your own {@link RecursiveComparisonConfiguration}.3781 * @param recursiveComparisonConfiguration the {@link RecursiveComparisonConfiguration} used in the chained {@link RecursiveComparisonAssert#isEqualTo(Object) isEqualTo} assertion.3782 *3783 * @return a new {@link RecursiveComparisonAssert} instance built with the given {@link RecursiveComparisonConfiguration}.3784 */3785 @Override3786 @Beta3787 public RecursiveComparisonAssert<?> usingRecursiveComparison(RecursiveComparisonConfiguration recursiveComparisonConfiguration) {3788 return super.usingRecursiveComparison(recursiveComparisonConfiguration).withTypeComparators(comparatorsByType);3789 }3790 /**3791 * Verifies that the array under test contains a single element and allows to perform assertions on that element.3792 * <p>3793 * By default available assertions after {@code singleElement()} are {@code Object} assertions, it is possible though to3794 * get more specific assertions by using {@link #singleElement(InstanceOfAssertFactory) singleElement(element assert factory)}3795 * <p>3796 * Example:3797 * <pre><code class='java'> String[] babySimpsons = { "Maggie" };3798 *3799 * // assertion succeeds, only Object assertions are available after singleElement()3800 * assertThat(babySimpsons).singleElement()3801 * .isEqualTo("Maggie");3802 *...

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1package org.assertj.core.api.objectarray;2import java.util.ArrayList;3import java.util.Arrays;4import java.util.List;5import org.assertj.core.api.AbstractObjectArrayAssert;6import org.assertj.core.api.ObjectArrayAssert;7import org.assertj.core.api.ObjectArrayAssertBaseTest;8import org.junit.jupiter.api.Test;9import static org.mockito.Mockito.verify;10public class ObjectArrayAssert_usingRecursiveComparison_Test extends ObjectArrayAssertBaseTest {11 void should_delegate_to_usingRecursiveComparison() {12 ObjectArrayAssert<Object> assertions = assertionsForActual(new Object[0]);13 assertions.usingRecursiveComparison();14 verify(objects).assertUsingRecursiveComparison(assertions.info, assertions.actual);15 }16}17package org.assertj.core.api.objectarray;18import java.util.ArrayList;19import java.util.Arrays;20import java.util.List;21import org.assertj.core.api.AbstractObjectArrayAssert;22import org.assertj.core.api.ObjectArrayAssert;23import org.assertj.core.api.ObjectArrayAssertBaseTest;24import org.junit.jupiter.api.Test;25import static org.mockito.Mockito.verify;26public class ObjectArrayAssert_usingRecursiveComparison_Test extends ObjectArrayAssertBaseTest {27 void should_delegate_to_usingRecursiveComparison() {28 ObjectArrayAssert<Object> assertions = assertionsForActual(new Object[0]);29 assertions.usingRecursiveComparison();30 verify(objects).assertUsingRecursiveComparison(assertions.info, assertions.actual);31 }32}33package org.assertj.core.api.objectarray;34import java.util.ArrayList;35import java.util.Arrays;36import java.util.List;37import org.assertj.core.api.AbstractObjectArrayAssert;38import org.assertj.core.api.ObjectArrayAssert;39import org.assertj.core.api.ObjectArrayAssertBaseTest;40import org.junit.jupiter.api.Test;41import static org.mockito.Mockito.verify;42public class ObjectArrayAssert_usingRecursiveComparison_Test extends ObjectArrayAssertBaseTest {43 void should_delegate_to_usingRecursiveComparison() {44 ObjectArrayAssert<Object> assertions = assertionsForActual(new Object[0]);45 assertions.usingRecursiveComparison();46 verify(objects).assertUsingRecursiveComparison(assertions.info, assertions.actual

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.assertj.core.api.Assertions;2import org.assertj.core.api.ObjectArrayAssert;3import org.assertj.core.api.ObjectArrayAssertBaseTest;4import org.junit.Test;5import static org.mockito.Mockito.verify;6public class ObjectArrayAssert_usingRecursiveComparison_Test extends ObjectArrayAssertBaseTest {7 public void invoke_api_like_user() {8 ObjectArrayAssert<Object> returned = assertions.usingRecursiveComparison();9 verify(objects).assertUsingRecursiveComparison(actual);10 Assertions.assertThat(returned).isSameAs(assertions);11 }12}13import org.assertj.core.api.Assertions;14import org.assertj.core.api.ObjectArrayAssertBaseTest;15import org.assertj.core.api.ObjectAssert;16import org.junit.Test;17import static org.mockito.Mockito.verify;18public class ObjectAssert_usingRecursiveComparison_Test extends ObjectArrayAssertBaseTest {19 public void invoke_api_like_user() {20 ObjectAssert<Object> returned = assertions.usingRecursiveComparison();21 verify(objects).assertUsingRecursiveComparison(actual);22 Assertions.assertThat(returned).isSameAs(assertions);23 }24}25import org.assertj.core.api.Assertions;26import org.assertj.core.api.ObjectArrayAssertBaseTest;27import org.assertj.core.api.ObjectEnumerableAssert;28import org.assertj.core.api.ObjectEnumerableAssertBaseTest;29import org.junit.Test;30import static org.mockito.Mockito.verify;31public class ObjectEnumerableAssert_usingRecursiveComparison_Test extends ObjectEnumerableAssertBaseTest {32 public void invoke_api_like_user() {33 ObjectEnumerableAssert<Object> returned = assertions.usingRecursiveComparison();34 verify(objects).assertUsingRecursiveComparison(actual);35 Assertions.assertThat(returned).isSameAs(assertions);36 }37}38import org.assertj.core.api.Assertions;39import org.assertj.core.api.ObjectEnumerableAssertBaseTest;40import org.assertj.core.api.ObjectAssert;41import org.junit.Test;42import static org.mockito.Mockito.verify;43public class ObjectAssert_usingRecursiveComparison_Test extends ObjectEnumerableAssertBaseTest {44 public void invoke_api_like_user() {

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.junit.jupiter.api.Test;2import static org.assertj.core.api.Assertions.assertThat;3import static org.assertj.core.api.Assertions.usingRecursiveComparison;4public class AssertjTest {5 public void testAssertj() {6 String[] expected = new String[] {"a", "b", "c"};7 String[] actual = new String[] {"a", "b", "c"};8 assertThat(actual).usingRecursiveComparison().isEqualTo(expected);9 }10}

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import static org.assertj.core.api.Assertions.assertThat;2import java.util.Arrays;3import java.util.List;4import org.junit.Test;5public class UsingRecursiveComparison {6 public void testUsingRecursiveComparison() {7 List<String> list1 = Arrays.asList("a", "b", "c");8 List<String> list2 = Arrays.asList("a", "b", "c");9 assertThat(new String[] { "a", "b", "c" }).usingRecursiveComparison()10 .isEqualTo(new String[] { "a", "b", "c" });11 }12}

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.assertj.core.api.AbstractObjectArrayAssert;2import org.assertj.core.api.Assertions;3import java.util.Arrays;4import java.util.List;5import java.util.ArrayList;6public class RecursiveComparison {7 public static void main(String[] args) {8 List<String> list1 = new ArrayList<String>();9 list1.add("a");10 list1.add("b");11 list1.add("c");12 List<String> list2 = new ArrayList<String>();13 list2.add("a");14 list2.add("b");15 list2.add("c");16 List<List<String>> list3 = new ArrayList<List<String>>();17 list3.add(list1);18 list3.add(list2);19 List<List<String>> list4 = new ArrayList<List<String>>();20 list4.add(list1);21 list4.add(list2);22 List<List<List<String>>> list5 = new ArrayList<List<List<String>>>();23 list5.add(list3);24 list5.add(list4);25 List<List<List<String>>> list6 = new ArrayList<List<List<String>>>();26 list6.add(list3);27 list6.add(list4);28 List<List<List<List<String>>>> list7 = new ArrayList<List<List<List<String>>>>();29 list7.add(list5);30 list7.add(list6);31 List<List<List<List<String>>>> list8 = new ArrayList<List<List<List<String>>>>();32 list8.add(list5);33 list8.add(list6);34 List<List<List<List<List<String>>>>> list9 = new ArrayList<List<List<List<List<String>>>>>();35 list9.add(list7);36 list9.add(list8);37 List<List<List<List<List<String>>>>> list10 = new ArrayList<List<List<List<List<String>>>>>();38 list10.add(list7);39 list10.add(list8);

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.assertj.core.api.AbstractObjectArrayAssert;2import org.assertj.core.api.Assertions;3import java.util.Arrays;4import java.util.List;5import java.util.ArrayList;6public class RecursiveComparison {7 public static void main(String[] args) {8 List<String> list1 = new ArrayList<String>();9 list1.add("a");10 list1.add("b");11 list1.add("c");12 List<String> list2 = new ArrayList<String>();13 list2.add("a");14 list2.add("b");15 list2.add("c");16 List<List<String>> list3 = new ArrayList<List<String>>();17 list3.add(list1);18 list3.add(list2);19 List<List<String>> list4 = new ArrayList<List<String>>();20 list4.add(list1);21 list4.add(list2);22 List<List<List<String>>> list5 = new ArrayList<List<List<String>>>();23 list5.add(list3);24 list5.add(list4);25 List<List<List<String>>> list6 = new ArrayList<List<List<String>>>();26 list6.add(list3);27 list6.add(list4);28 List<List<List<List<String>>>> list7 = new ArrayList<List<List<List<String>>>>();29 list7.add(list5);30 list7.add(list6);31 List<List<List<List<String>>>> list8 = new ArrayList<List<List<List<String>>>>();32 list8.add(list5);33 list8.add(list6);34 List<List<List<List<List<String>>>>> list9 = new ArrayList<List<List<List<List<String>>>>>();35 list9.add(list7);36 list9.add(list8);37 List<List<List<List<List<String>>>>> list10 = new ArrayList<List<List<List<List<String>>>>>();38 list10.add(list7);39 list10.add(list8);

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.junit.Test;2import static org.assertj.core.api.Assertions.assertThat;3public class UsingRecursiveComparison {4 public void testUsingRecursiveComparison() {5 String[] expected = {"Apple", "Orange", "Banana"};6 String[] actual = {"Apple", "Orange", "Banana"};7 assertThat(actual).usingRecursiveComparison().isEqualTo(expected);8 }9}

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1package org.assertj.core.ai.array;2import org.assertj.core.api.Assertions;3import org.junit.jupiter.api.Test;4public class ObjectArrayAssert_usingRecursiveComparison_Test {5 public void test() {6 Object[] actual = {new Object()};7 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);8 }9}10package org.assertj.core.api.object;11import org.assertj.core.api.Assertions;12import org.junit.jupiter.api.Test;13public class ObjectAssert_usingRecursiveComparison_Test {14 public void test() {15 Object actual = new Object();16 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);17 }18}19package org.assertj.core.api.iterable;20import org.assertj.core.api.Assertions;21import org.junit.jupiter.api.Test;22public class IterableAssert_usingRecursiveComparison_Test {23 public void test() {24 Iterable<Object> actual = new Iterable<Object>() {25 public Iterator<Object> iterator() {26 return new Iterator<Object>() {27 public boolean hasNext() {28 return false;29 }30 public Object next() {31 return null;32 }33 };34 }35 };36 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);37 }38}39package org.assertj.core.api.list;40import org.assertj.core.api.Assertions;41import org.junit.jupiter.api.Test;42public class ListAssert_usingRecursiveComparison_Test {43 public void test() {44 List<Object> actual = new List<Object>() {45 public int size() {46 return 0;47 }48 public boolean isEmpty() {49 return false;50 }51 public boolean contains(Object o) {52 return false;53 }54 public Iterator<Object> iterator() {55 return new Iterator<Object>() {56 public boolean hasNext() {57 return false;58 }59 public Object next() {60 return null;61 }62 };63 }64 public Object[] toArray() {65 return new Object[0];66 }67 public <T> T[] toArray(T[] a) {68 return null;69 }70 public boolean add(Object o) {71 return false;72 }

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import org.assertj.core.api.Assertions;2import java.util.Arrays;3import java.util.List;4public class AssertionsUsingRecursiveComparison {5 public static void main(String[] args) {6 List<Integer> list1 = Arrays.asList(1, 2, 3);7 List<Integer> list2 = Arrays.asList(1, 2, 3);8 Assertions.assertThat(list1).usingRecursiveComparison().isEqualTo(list2);9 }10}

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1import java.util.Arrays;2import org.assertj.core.api.Assertions;3public class RecursiveComparison {4 public static void main(String[] args) {5 int[] array1 = { 1, 2, 3 };6 int[] array2 = { 1, 2, 3 };7 Assertions.assertThat(array1).usingRecursiveComparison().isEqualTo(array2);8 }9}

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1package org.assertj.core.api.array;2import org.assertj.core.api.Assertions;3import org.junit.jupiter.api.Test;4public class ObjectArrayAssert_usingRecursiveComparison_Test {5 public void test() {6 Object[] actual = {new Object()};7 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);8 }9}10package org.assertj.core.api.object;11import org.assertj.core.api.Assertions;12import org.junit.jupiter.api.Test;13public class ObjectAssert_usingRecursiveComparison_Test {14 public void test() {15 Object actual = new Object();16 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);17 }18}19package org.assertj.core.api.iterable;20import org.assertj.core.api.Assertions;21import org.junit.jupiter.api.Test;22public class IterableAssert_usingRecursiveComparison_Test {23 public void test() {24 Iterable<Object> actual = new Iterable<Object>() {25 public Iterator<Object> iterator() {26 return new Iterator<Object>() {27 public boolean hasNext() {28 return false;29 }30 public Object next() {31 return null;32 }33 };34 }35 };36 Assertions.assertThat(actual).usingRecursiveComparison().isEqualTo(actual);37 }38}39package org.assertj.core.api.list;40import org.assertj.core.api.Assertions;41import org.junit.jupiter.api.Test;42public class ListAssert_usingRecursiveComparison_Test {43 public void test() {44 List<Object> actual = new List<Object>() {45 public int size() {46 return 0;47 }48 public boolean isEmpty() {49 return false;50 }51 public boolean contains(Object o) {52 return false;53 }54 public Iterator<Object> iterator() {55 return new Iterator<Object>() {56 public boolean hasNext() {57 return false;58 }59 public Object next() {60 return null;61 }62 };63 }64 public Object[] toArray() {65 return new Object[0];66 }67 public <T> T[] toArray(T[] a) {68 return null;69 }70 public boolean add(Object o) {71 return false;72 }

Full Screen

Full Screen

usingRecursiveComparison

Using AI Code Generation

copy

Full Screen

1package org.codeexample.assertj;2import static org.assertj.core.api.Assertions.assertThat;3import static org.junit.Assert.assertTrue;4import org.junit.Test;5public class AssertJArrayTest {6 public void testAssertJArray() {7 String[] expected = new String[] { "one", "two", "three" };8 String[] actual = new String[] { "one", "two", "three" };9 assertThat(actual).usingRecursiveComparison().isEqualTo(expected);10 assertTrue(true);11 }12}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Assertj automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in AbstractObjectArrayAssert

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful