Bug 118516 [DataBinding] Asserts should provide meaningful messages
Currently we use JDK Assert in various places in the code. However, if an assert fails, there often is no indication of why it failed or what the assert failure means without looking at the code indicated by the stack trace. It would be nicer if we would log exceptions or throw RuntimeExceptions with useful error messages instead.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableSingleSelectionObservableValueTest.java
public void testSetValue() throws Exception {
		
		assertEquals(-1, table.getSelectionIndex());
		assertEquals(-1, ((Integer) observable.getValue()).intValue());
		Integer value = new Integer(0);
		observable.setValue(value);
		assertEquals("table selection index", value.intValue(), table
				.getSelectionIndex());
		assertEquals("observable value", value, observable.getValue());
	}
	
	public void testGetValue() throws Exception {
		int value = 1;
		table.setSelection(value);
		
		assertEquals("table selection index", value, table.getSelectionIndex());
		assertEquals("observable value", new Integer(value), observable.getValue());
	}
	public static Test suite() {
		Delegate delegate = new Delegate();
		return new SuiteBuilder().addTests(
				TableSingleSelectionObservableValueTest.class)
				.addObservableContractTest(
						SWTObservableValueContractTest.class, delegate)
				.addObservableContractTest(
						SWTMutableObservableValueContractTest.class, delegate)
				.build();
	}
	static class Delegate extends