use of com.vaadin.server.PaintException in project linkki by linkki-framework.
the class UISubsetChooserTest method createSubsetChooser.
/**
* Returns a {@code SubsetChooser} that is bound to a {@link AnnotationTestPmo} using the
* IPM data binder. The {@code SubsetChooser} is part of a mostly mocked UI so that a
* rudimentary Vaadin environment is in place.
*
* @return a {@code SubsetChooser} that is bound to a {@link AnnotationTestPmo}
*/
private SubsetChooser createSubsetChooser(Object pmo) {
try {
SubsetChooser subsetChooser = (SubsetChooser) TestUiUtil.createFirstComponentOf(pmo);
// initializes the internal itemIdMapper which is needed to
// fake selection from UI using AbstractSelect#changeVariables(...)
subsetChooser.paintContent(mock(PaintTarget.class));
return subsetChooser;
} catch (PaintException e) {
throw new RuntimeException(e);
}
}
Aggregations