Search in sources :

Example 1 with LinkkiBindingException

use of org.linkki.core.binding.LinkkiBindingException in project linkki by linkki-framework.

the class UITableColumnIntegrationTest method testSortable_ModelBindingThrowsException.

@Test
void testSortable_ModelBindingThrowsException() {
    LinkkiBindingException exception = assertThrows(LinkkiBindingException.class, () -> {
        GridComponentCreator.createGrid(new ModelBindingTablePmo(), new BindingContext());
    });
    assertThat(exception.getMessage(), containsString("Could not read ModelBindingRowPmo#getString"));
}
Also used : LinkkiBindingException(org.linkki.core.binding.LinkkiBindingException) BindingContext(org.linkki.core.binding.BindingContext) Test(org.junit.jupiter.api.Test)

Example 2 with LinkkiBindingException

use of org.linkki.core.binding.LinkkiBindingException in project linkki by linkki-framework.

the class UITableColumnIntegrationTest method testSortable_NonComparableThrowsException.

@Test
void testSortable_NonComparableThrowsException() {
    LinkkiBindingException exception = assertThrows(LinkkiBindingException.class, () -> {
        GridComponentCreator.createGrid(new NonComparableTablePmo(), new BindingContext());
    });
    assertThat(exception.getMessage(), containsString("Cannot sort by NonComparableRowPmo#object as java.lang.Object does not implement Comparable"));
}
Also used : LinkkiBindingException(org.linkki.core.binding.LinkkiBindingException) BindingContext(org.linkki.core.binding.BindingContext) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 BindingContext (org.linkki.core.binding.BindingContext)2 LinkkiBindingException (org.linkki.core.binding.LinkkiBindingException)2