@Test(expected = AssertionError.class) public void testAssertThat_child_at_property_path_builder_does_exist_fails_when_child_doesnt_exist() { assertThat(null) .child(PropertyPath.createBuilder().withRoot().withPropertyName("value")) .doesExist(); }
@Test public void testAssertThat_child_at_property_path_builder_does_exist_succeeds_when_child_exist() { final ObjectWithString working = new ObjectWithString("foo"); final ObjectWithString base = new ObjectWithString("bar"); final Node node = ObjectDifferFactory.getInstance().compare(working, base); assertThat(node) .child(PropertyPath.createBuilder().withRoot().withPropertyName("value")) .doesExist(); }