@Test public void getMappingValueNullValue() throws Exception { SimpleEntity data = new SimpleEntity(); data.myMappedProperty = null; EdmMapping mapping = mockMapping("getMyMappedProperty"); Object value = ava.getMappingValue(data, mapping); Assert.assertNull(value); }
@Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }
BeanPropertyAccess implements ValueAccess { @Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; } }
BeanPropertyAccess implements ValueAccess { @Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }  }
BeanPropertyAccess implements ValueAccess { @Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }  @Override Object getPropertyValue(final T data, final EdmProperty property); @Override void setPropertyValue(final T data, final EdmProperty property, final V value); @Override Class<?> getPropertyType(final T data, final EdmProperty property); @Override Object getMappingValue(final T data, final EdmMapping mapping); @Override void setMappingValue(final T data, final EdmMapping mapping, final V value); }
BeanPropertyAccess implements ValueAccess { @Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }  @Override Object getPropertyValue(final T data, final EdmProperty property); @Override void setPropertyValue(final T data, final EdmProperty property, final V value); @Override Class<?> getPropertyType(final T data, final EdmProperty property); @Override Object getMappingValue(final T data, final EdmMapping mapping); @Override void setMappingValue(final T data, final EdmMapping mapping, final V value);  }