Skip to content

Commit 6fea61d

Browse files
Suppress deprecation warnings in tests for deprecated method isEqualToComparingFieldByFieldRecursively.
1 parent 7199ac9 commit 6fea61d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/test/java/org/assertj/core/error/ShouldBeEqualByComparingFieldByFieldRecursively_create_Test.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class ShouldBeEqualByComparingFieldByFieldRecursively_create_Test {
4545
private static final Representation REPRESENTATION = CONFIGURATION_PROVIDER.representation();
4646

4747
@Test
48+
@SuppressWarnings("deprecation") // test for deprecated method
4849
public void should_throw_assertion_error_rather_than_null_pointer_when_one_nested_member_is_null() {
4950
// GIVEN
5051
Jedi yoda = new Jedi("Yoda", "Green");
@@ -157,6 +158,7 @@ public void should_precise_missing_fields_when_actual_does_not_declare_all_expec
157158
}
158159

159160
@Test
161+
@SuppressWarnings("deprecation") // test for deprecated method
160162
public void should_not_fall_with_npe_if_field_of_one_of_compared_objects_is_null() {
161163
// GIVEN
162164
final Name actualName = new Name("Andy");

src/test/java/org/assertj/core/internal/objects/Objects_assertIsEqualToComparingFieldByFieldRecursive_Test.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public void should_be_able_to_compare_objects_of_different_types_recursively() {
8181
}
8282

8383
@Test
84+
@SuppressWarnings("deprecation") // test for deprecated method
8485
public void should_be_able_to_compare_objects_recursively_using_some_precision_for_numerical_types() {
8586
Giant goliath = new Giant();
8687
goliath.name = "Goliath";
@@ -95,6 +96,7 @@ public void should_be_able_to_compare_objects_recursively_using_some_precision_f
9596
}
9697

9798
@Test
99+
@SuppressWarnings("deprecation") // test for deprecated method
98100
public void should_be_able_to_compare_objects_recursively_using_given_comparator_for_specified_field() {
99101
Giant goliath = new Giant();
100102
goliath.name = "Goliath";
@@ -109,6 +111,7 @@ public void should_be_able_to_compare_objects_recursively_using_given_comparator
109111
}
110112

111113
@Test
114+
@SuppressWarnings("deprecation") // test for deprecated method
112115
public void should_be_able_to_compare_objects_recursively_using_given_comparator_for_specified_nested_field() {
113116
Giant goliath = new Giant();
114117
goliath.name = "Goliath";
@@ -204,6 +207,7 @@ public void should_fail_when_fields_of_child_objects_differ() {
204207
}
205208

206209
@Test
210+
@SuppressWarnings("deprecation") // test for deprecated method
207211
public void should_have_error_message_with_differences_and_path_to_differences() {
208212
Person actual = new Person();
209213
actual.name = "Jack";
@@ -227,6 +231,7 @@ public void should_have_error_message_with_differences_and_path_to_differences()
227231
}
228232

229233
@Test
234+
@SuppressWarnings("deprecation") // test for deprecated method
230235
public void should_have_error_message_with_path_to_difference_when_difference_is_in_collection() {
231236
FriendlyPerson actual = new FriendlyPerson();
232237
FriendlyPerson friendOfActual = new FriendlyPerson();
@@ -276,6 +281,7 @@ public void should_not_use_equal_implementation_of_objects_to_compare() {
276281
}
277282

278283
@Test
284+
@SuppressWarnings("deprecation") // test for deprecated method
279285
public void should_fail_when_comparing_unsorted_with_sorted_set() {
280286
WithCollection<String> actual = new WithCollection<>(new LinkedHashSet<String>());
281287
actual.collection.add("bar");
@@ -296,6 +302,7 @@ public void should_fail_when_comparing_unsorted_with_sorted_set() {
296302
}
297303

298304
@Test
305+
@SuppressWarnings("deprecation") // test for deprecated method
299306
public void should_fail_when_comparing_sorted_with_unsorted_set() {
300307
WithCollection<String> actual = new WithCollection<>(new TreeSet<String>());
301308
actual.collection.add("bar");
@@ -316,6 +323,7 @@ public void should_fail_when_comparing_sorted_with_unsorted_set() {
316323
}
317324

318325
@Test
326+
@SuppressWarnings("deprecation") // test for deprecated method
319327
public void should_fail_when_comparing_unsorted_with_sorted_map() {
320328
WithMap<Long, Boolean> actual = new WithMap<>(new LinkedHashMap<>());
321329
actual.map.put(1L, true);
@@ -336,6 +344,7 @@ public void should_fail_when_comparing_unsorted_with_sorted_map() {
336344
}
337345

338346
@Test
347+
@SuppressWarnings("deprecation") // test for deprecated method
339348
public void should_fail_when_comparing_sorted_with_unsorted_map() {
340349
WithMap<Long, Boolean> actual = new WithMap<>(new TreeMap<Long, Boolean>());
341350
actual.map.put(1L, true);
@@ -356,6 +365,7 @@ public void should_fail_when_comparing_sorted_with_unsorted_map() {
356365
}
357366

358367
@Test
368+
@SuppressWarnings("deprecation") // test for deprecated method
359369
public void should_handle_null_field_with_field_comparator() {
360370
// GIVEN
361371
Patient adam = new Patient(null);
@@ -366,6 +376,7 @@ public void should_handle_null_field_with_field_comparator() {
366376
}
367377

368378
@Test
379+
@SuppressWarnings("deprecation") // test for deprecated method
369380
public void should_handle_null_field_with_type_comparator() {
370381
// GIVEN
371382
Patient adam = new Patient(null);
@@ -376,6 +387,7 @@ public void should_handle_null_field_with_type_comparator() {
376387
}
377388

378389
@Test
390+
@SuppressWarnings("deprecation") // test for deprecated method
379391
public void should_not_bother_with_comparators_when_fields_are_the_same() {
380392
// GIVEN
381393
Timestamp dateOfBirth = new Timestamp(3L);
@@ -456,6 +468,7 @@ public void should_be_able_to_compare_objects_with_percentages() {
456468
}
457469

458470
@Test
471+
@SuppressWarnings("deprecation") // test for deprecated method
459472
public void should_report_missing_property() {
460473
// GIVEN
461474
Human joe = new Human();

0 commit comments

Comments
 (0)