Description
Nearly all components are clickable, but there is no prebuilt click
method in the testers. This means, the dev has to fire a ClickEvent
manually, which implies somehow internal knowledge (as you normaly do not use that event in normal code).
Something like
ComponenTester ... {
/**
* Simulates a click as if it came from the client by setting the "fromClient" to true. Please note, that
* there are no mouse details at all, but default values only, like x = 0 etc.
*/
public void click() {
ComponentUtil.fireEvent(getComponent(), new ClickEvent<>(getComponent(), false,
0, 0, 0, 0, 0, 0, false,false, false, false));
}
}