use of org.assertj.core.test.Jedi in project assertj-core by joel-costigliola.
the class Objects_assertIsEqualToIgnoringGivenFields_Test method should_fail_if_actual_is_null.
@Test
public void should_fail_if_actual_is_null() {
thrown.expectAssertionError(actualIsNull());
Jedi other = new Jedi("Yoda", "Green");
objects.assertIsEqualToIgnoringGivenFields(someInfo(), null, other, noFieldComparators(), defaultTypeComparators(), "name");
}
use of org.assertj.core.test.Jedi in project assertj-core by joel-costigliola.
the class Objects_assertIsEqualToIgnoringGivenFields_Test method should_pass_when_not_ignored_fields_are_equal.
@Test
public void should_pass_when_not_ignored_fields_are_equal() {
Jedi actual = new Jedi("Yoda", "Green");
Jedi other = new Jedi("Yoda", "Blue");
// strangeNotReadablePrivateField fields are compared and are null in both actual and other
objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, noFieldComparators(), defaultTypeComparators(), "lightSaberColor");
}
use of org.assertj.core.test.Jedi in project assertj-core by joel-costigliola.
the class Objects_assertIsEqualToIgnoringGivenFields_Test method should_pass_when_not_ignored_fields_are_equal_even_if_one_ignored_field_is_not_defined.
@Test
public void should_pass_when_not_ignored_fields_are_equal_even_if_one_ignored_field_is_not_defined() {
Person actual = new Person("Yoda");
Jedi other = new Jedi("Yoda", "Green");
objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, noFieldComparators(), defaultTypeComparators(), "lightSaberColor");
}
use of org.assertj.core.test.Jedi in project assertj-core by joel-costigliola.
the class Objects_assertIsEqualToIgnoringNullFields_Test method should_pass_when_some_other_field_is_null_but_not_actual.
@Test
public void should_pass_when_some_other_field_is_null_but_not_actual() {
Jedi actual = new Jedi("Yoda", "Green");
Jedi other = new Jedi("Yoda", null);
objects.assertIsEqualToIgnoringNullFields(someInfo(), actual, other, noFieldComparators(), defaultTypeComparators());
}
use of org.assertj.core.test.Jedi in project assertj-core by joel-costigliola.
the class Objects_assertIsEqualToIgnoringNullFields_Test method should_pass_when_fields_are_equal.
@Test
public void should_pass_when_fields_are_equal() {
Jedi actual = new Jedi("Yoda", "Green");
Jedi other = new Jedi("Yoda", "Green");
objects.assertIsEqualToIgnoringNullFields(someInfo(), actual, other, noFieldComparators(), defaultTypeComparators());
}
Aggregations