Code example for MutablePropertyValues

Methods: add

0
		assertEquals("12:00:00", binder.getBindingResult().getFieldValue("isoTime"));
	} 
 
	@Test
	public void testBindISODateTime() { 
		MutablePropertyValues propertyValues = new MutablePropertyValues();
		propertyValues.add("isoDateTime", "2009-10-31T12:00:00.000Z");
		binder.bind(propertyValues);
		assertEquals(0, binder.getBindingResult().getErrorCount());
		assertEquals("2009-10-31T12:00:00", binder.getBindingResult().getFieldValue("isoDateTime"));
	} 
 
	@Test
	public void testBindInstant() { 
		MutablePropertyValues propertyValues = new MutablePropertyValues();
		propertyValues.add("instant", "2009-10-31T12:00:00.000Z");
		binder.bind(propertyValues);
		assertEquals(0, binder.getBindingResult().getErrorCount());
		assertTrue(binder.getBindingResult().getFieldValue("instant").toString().startsWith("2009-10-31T12:00"));
	} 
Contextual code suggestions in your IDE  Get Codota for Java