Search in sources :

Example 1 with InnerClass

use of org.assertj.core.internal.objects.Objects_assertIsEqualToIgnoringGivenFields_Test.OuterClass.InnerClass in project assertj-core by joel-costigliola.

the class Objects_assertIsEqualToIgnoringGivenFields_Test method should_pass_when_class_has_synthetic_field.

@Test
public void should_pass_when_class_has_synthetic_field() {
    InnerClass actual = new OuterClass().createInnerClass();
    InnerClass other = new OuterClass().createInnerClass();
    // ensure that the compiler has generated at one synthetic field for the comparison
    assertThat(InnerClass.class.getDeclaredFields()).extracting("synthetic").contains(Boolean.TRUE);
    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, noFieldComparators(), defaultTypeComparators());
}
Also used : InnerClass(org.assertj.core.internal.objects.Objects_assertIsEqualToIgnoringGivenFields_Test.OuterClass.InnerClass) ObjectsBaseTest(org.assertj.core.internal.ObjectsBaseTest) Test(org.junit.Test)

Aggregations

ObjectsBaseTest (org.assertj.core.internal.ObjectsBaseTest)1 InnerClass (org.assertj.core.internal.objects.Objects_assertIsEqualToIgnoringGivenFields_Test.OuterClass.InnerClass)1 Test (org.junit.Test)1