use of com.karuslabs.commons.graphics.ClickEvent in project Karus-Commons by Pante.
the class CheckBoxTest method click.
@ParameterizedTest
@CsvSource({ "true, 0, 1", "false, 1, 0" })
void click(boolean checked, int check, int uncheck) {
checkbox.checked = checked;
ClickEvent event = mock(ClickEvent.class);
checkbox.click(event);
verify(checkbox, times(check)).check(event);
verify(checkbox, times(uncheck)).uncheck(event);
assertEquals(!checked, checkbox.checked);
}
use of com.karuslabs.commons.graphics.ClickEvent in project Karus-Commons by Pante.
the class CyclicButtonTest method click.
@Test
void click() {
button.index = 0;
ClickEvent event = mock(ClickEvent.class);
button.click(event);
verify(button).onClick(event, "a");
assertEquals("b", button.current());
assertEquals(1, button.index());
}
Aggregations