@Test public void should_return_MockObjectOfUnknownType_for_existing_list_property_without_declard_component_type() throws Exception { assertThat(resolver.getValue(Collections.EMPTY_LIST, 123) , is(instanceOf(MockObjectOfUnknownType.class))); }
public Object getValue(Object target, Object property) throws GenericElEvaluationException, PropertyNotFoundException { return this.getValue(target, property, getTypeOfCollectionOrBean(target, property)); }
MockingPropertyResolver implements PredefinedVariableResolver.NewVariableEncounteredListener { public Object getValue(Object target, Object property) throws GenericElEvaluationException, PropertyNotFoundException { return this.getValue(target, property, getTypeOfCollectionOrBean(target, property)); } }
MockingPropertyResolver implements PredefinedVariableResolver.NewVariableEncounteredListener { public Object getValue(Object target, Object property) throws GenericElEvaluationException, PropertyNotFoundException { return this.getValue(target, property, getTypeOfCollectionOrBean(target, property)); } MockingPropertyResolver(); }
MockingPropertyResolver implements PredefinedVariableResolver.NewVariableEncounteredListener { public Object getValue(Object target, Object property) throws GenericElEvaluationException, PropertyNotFoundException { return this.getValue(target, property, getTypeOfCollectionOrBean(target, property)); } MockingPropertyResolver(); void definePropertyTypeOverride(final String elExpression, final Class<?> newType); Class<?> getTypeOfCollectionOrBean(Object target, Object property); Object getValue(Object target, Object property); @SuppressWarnings("rawtypes") Object getValue(final Object target, final Object property, final Class originalType); void handleNewVariableEncountered(final String variableName); void addElExpressionFilter(ElExpressionFilter elExpressionFilter); void clearElExpressionFilters(); void setTypeResolver(PropertyTypeResolver typeResolver); }
MockingPropertyResolver implements PredefinedVariableResolver.NewVariableEncounteredListener { public Object getValue(Object target, Object property) throws GenericElEvaluationException, PropertyNotFoundException { return this.getValue(target, property, getTypeOfCollectionOrBean(target, property)); } MockingPropertyResolver(); void definePropertyTypeOverride(final String elExpression, final Class<?> newType); Class<?> getTypeOfCollectionOrBean(Object target, Object property); Object getValue(Object target, Object property); @SuppressWarnings("rawtypes") Object getValue(final Object target, final Object property, final Class originalType); void handleNewVariableEncountered(final String variableName); void addElExpressionFilter(ElExpressionFilter elExpressionFilter); void clearElExpressionFilters(); void setTypeResolver(PropertyTypeResolver typeResolver);  }