@Test public void null_collection_length_reduced() { execute( Input.of(HUNT_NULL_LIMB), Query.of(Predicates.equal("limbs_[any].fingers_.length", 1), mv), Expected.empty()); }
@Test public void null_collection_length_compared_to_null() { execute( Input.of(HUNT_NULL_LIMB), Query.of(Predicates.equal("limbs_[0].fingers_.length", null), mv), Expected.of(HUNT_NULL_LIMB)); }
@Test public void length_property_atLeaf() { execute( Input.of(BOND, KRUEGER), Query.of(Predicates.equal("limbs_[0].tattoos_.length", 1), mv), Expected.of(KRUEGER)); }
@Test public void length_property() { execute( Input.of(BOND, KRUEGER), Query.of(Predicates.equal("limbs_.length", 2), mv), Expected.of(BOND, KRUEGER)); }
@Test public void null_collection_length_atLeaf_reduced_compared_to_null() { execute( Input.of(HUNT_NULL_TATTOOS), Query.of(Predicates.equal("limbs_[any].tattoos_.length", null), mv), Expected.of(HUNT_NULL_TATTOOS)); }
@Test public void null_collection_length_atLeaf() { execute( Input.of(HUNT_NULL_TATTOOS), Query.of(Predicates.equal("limbs_[0].tattoos_.length", 1), mv), Expected.empty()); }
/** * Get the {@link Query} instance for the given model class. * * @param modelClass the model class * @return an instance of {@link Query} */ protected <T extends Model> Query<T> all(Class<T> modelClass) { return Query.of(modelClass); }