@Test void populateRawProperties() throws PropertyException { Map<String, Object> values = new HashMap<>(); values.put("pro1", "value1"); values.put("prop2", 2); RawPropertiesTest bean = new RawPropertiesTest(); this.defaultBeanManager.populate(bean, values); assertEquals(values, bean); }
@Override public void populate(Object bean, Map<String, ?> values) throws PropertyException { Map<String, Object> remainingValues = new HashMap<>(values); populateBean(bean, remainingValues); if (!remainingValues.isEmpty() && bean instanceof RawProperties) { RawProperties rawProperties = (RawProperties) bean; for (Map.Entry<String, Object> entry : remainingValues.entrySet()) { rawProperties.set(entry.getKey(), entry.getValue()); } } validateBean(bean); }
DefaultBeanManager implements BeanManager { @Override public void populate(Object bean, Map<String, ?> values) throws PropertyException { Map<String, Object> remainingValues = new HashMap<>(values); populateBean(bean, remainingValues); if (!remainingValues.isEmpty() && bean instanceof RawProperties) { RawProperties rawProperties = (RawProperties) bean; for (Map.Entry<String, Object> entry : remainingValues.entrySet()) { rawProperties.set(entry.getKey(), entry.getValue()); } } validateBean(bean); } }
DefaultBeanManager implements BeanManager { @Override public void populate(Object bean, Map<String, ?> values) throws PropertyException { Map<String, Object> remainingValues = new HashMap<>(values); populateBean(bean, remainingValues); if (!remainingValues.isEmpty() && bean instanceof RawProperties) { RawProperties rawProperties = (RawProperties) bean; for (Map.Entry<String, Object> entry : remainingValues.entrySet()) { rawProperties.set(entry.getKey(), entry.getValue()); } } validateBean(bean); }  }
DefaultBeanManager implements BeanManager { @Override public void populate(Object bean, Map<String, ?> values) throws PropertyException { Map<String, Object> remainingValues = new HashMap<>(values); populateBean(bean, remainingValues); if (!remainingValues.isEmpty() && bean instanceof RawProperties) { RawProperties rawProperties = (RawProperties) bean; for (Map.Entry<String, Object> entry : remainingValues.entrySet()) { rawProperties.set(entry.getKey(), entry.getValue()); } } validateBean(bean); }  ValidatorFactory getValidatorFactory(); @Override void populate(Object bean, Map<String, ?> values); @Override BeanDescriptor getBeanDescriptor(Class<?> beanClass); }
DefaultBeanManager implements BeanManager { @Override public void populate(Object bean, Map<String, ?> values) throws PropertyException { Map<String, Object> remainingValues = new HashMap<>(values); populateBean(bean, remainingValues); if (!remainingValues.isEmpty() && bean instanceof RawProperties) { RawProperties rawProperties = (RawProperties) bean; for (Map.Entry<String, Object> entry : remainingValues.entrySet()) { rawProperties.set(entry.getKey(), entry.getValue()); } } validateBean(bean); }  ValidatorFactory getValidatorFactory(); @Override void populate(Object bean, Map<String, ?> values); @Override BeanDescriptor getBeanDescriptor(Class<?> beanClass);  }