@Test public void getValuesForMissingProperty() throws Exception { ClassPropertyReference propertyReference = new ClassPropertyReference("status", this.classReference); EntityReferenceSerializer<String> entityReferenceSerializer = this.mocker.getInstance(EntityReferenceSerializer.TYPE_STRING); when(entityReferenceSerializer.serialize(propertyReference)).thenReturn("status reference"); try { this.mocker.getComponentUnderTest().getValues(propertyReference, 13); fail(); } catch (XWikiRestException expected) { assertEquals("No such property [status reference].", expected.getMessage()); } }
@Override public PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters) throws XWikiRestException { return getDedicatedProvider(getPropertyType(propertyReference)).getValues(propertyReference, limit, filterParameters); }
DefaultClassPropertyValuesProvider implements ClassPropertyValuesProvider { @Override public PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters) throws XWikiRestException { return getDedicatedProvider(getPropertyType(propertyReference)).getValues(propertyReference, limit, filterParameters); } }
DefaultClassPropertyValuesProvider implements ClassPropertyValuesProvider { @Override public PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters) throws XWikiRestException { return getDedicatedProvider(getPropertyType(propertyReference)).getValues(propertyReference, limit, filterParameters); }  }
DefaultClassPropertyValuesProvider implements ClassPropertyValuesProvider { @Override public PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters) throws XWikiRestException { return getDedicatedProvider(getPropertyType(propertyReference)).getValues(propertyReference, limit, filterParameters); }  @Override PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters); @Override PropertyValue getValue(ClassPropertyReference propertyReference, Object rawValue); }
DefaultClassPropertyValuesProvider implements ClassPropertyValuesProvider { @Override public PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters) throws XWikiRestException { return getDedicatedProvider(getPropertyType(propertyReference)).getValues(propertyReference, limit, filterParameters); }  @Override PropertyValues getValues(ClassPropertyReference propertyReference, int limit, Object... filterParameters); @Override PropertyValue getValue(ClassPropertyReference propertyReference, Object rawValue);  }