Search in sources :

Example 1 with ConversionFailedException

use of org.eclipse.nebula.widgets.nattable.data.convert.ConversionFailedException in project nebula.widgets.nattable by eclipse.

the class DefaultDateDisplayConverterTest method invalidDataType.

@Test
public void invalidDataType() throws Exception {
    final DefaultDateDisplayConverter converter = new DefaultDateDisplayConverter();
    System.err.println("** THE FOLLOWING STACK TRACE IS EXPECTED **");
    assertEquals("XXX", converter.canonicalToDisplayValue("XXX"));
    try {
        converter.displayToCanonicalValue("AAA");
        fail("ConversionFailedException should have been throwed");
    } catch (ConversionFailedException e) {
    }
}
Also used : ConversionFailedException(org.eclipse.nebula.widgets.nattable.data.convert.ConversionFailedException) DefaultDateDisplayConverter(org.eclipse.nebula.widgets.nattable.data.convert.DefaultDateDisplayConverter) Test(org.junit.Test)

Aggregations

ConversionFailedException (org.eclipse.nebula.widgets.nattable.data.convert.ConversionFailedException)1 DefaultDateDisplayConverter (org.eclipse.nebula.widgets.nattable.data.convert.DefaultDateDisplayConverter)1 Test (org.junit.Test)1