Bug 147530 [DataBinding] Provide event objects for change listeners
Before data binding goes 1.0 it would be wise to provide EventObjects for the following listeners to ensure that the API doesn't preclude future expansion of the values supplied to listeners. Interfaces that would be affected: * IValueChangeListener * IValueChangingListener * IListChangeListener * ISetChangeListener * IMappingChangeListener
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java
}
		};
		dbc.bindValue(targetObservable, modelObservable, new DefaultBindSpec()
				.setTargetValidator(validator));
		targetObservable.setValue("");
		assertFalse(((IStatus) error.getValue()).isOK());
		assertEquals(errorMessage, ((IStatus) error.getValue()).getMessage());
		assertEquals(1, errors.size());
		assertEquals(1, errorsCounter.count);
		assertEquals(1, errorCounter.count);
	}
	/**
	 * Asserts that then
	 * {@link DataBindingContext#bindValue(IObservableValue, IObservableValue, org.eclipse.jface.databinding.DefaultBindSpec)}
	 * if invoked the created binding is added to the internal list of bindings.
	 * 
	 * @throws Exception
	 */
	public void testBindValueAddBinding() throws Exception {
		WritableValue targetValue = new WritableValue(String.class);
		WritableValue modelValue = new WritableValue(String.class);
		DataBindingContext dbc = new DataBindingContext();
		assertNotNull(dbc.getBindings());
		assertEquals(0, dbc.getBindings().size());
		Binding binding = dbc.bindValue(targetValue, modelValue, null);
		assertNotNull(binding);
		assertNotNull(dbc.getBindings());
		assertEquals(1, dbc.getBindings().size());
		assertEquals(binding, dbc.getBindings().get(0));
	}