Search in sources :

Example 1 with ClickListener

use of com.google.gwt.user.client.ui.ClickListener in project gwt-test-utils by gwt-test-utils.

the class ButtonTest method click_ClickListener.

@Test
public void click_ClickListener() {
    // Given
    b.addClickListener(new ClickListener() {

        public void onClick(Widget sender) {
            b.setHTML("clicked");
        }
    });
    // Preconditions
    assertThat(b.getHTML()).isEqualTo("");
    // When
    b.click();
    // Then
    assertThat(b.getHTML()).isEqualTo("clicked");
}
Also used : Widget(com.google.gwt.user.client.ui.Widget) ClickListener(com.google.gwt.user.client.ui.ClickListener) Test(org.junit.Test)

Aggregations

ClickListener (com.google.gwt.user.client.ui.ClickListener)1 Widget (com.google.gwt.user.client.ui.Widget)1 Test (org.junit.Test)1