Example usage for org.apache.wicket.ajax.markup.html AjaxLink isVisible

List of usage examples for org.apache.wicket.ajax.markup.html AjaxLink isVisible

Introduction

In this page you can find the example usage for org.apache.wicket.ajax.markup.html AjaxLink isVisible.

Prototype

public boolean isVisible() 

Source Link

Document

Gets whether this component and any children are visible.

Usage

From source file:org.obiba.onyx.jade.core.wicket.instrument.InstrumentLaunchPanelTest.java

License:Open Source License

@Test
public void testPresenceOfManualButtonWhenManualCaptureAllowed() {
    instrumentType.setManualCaptureAllowed(true);

    expect(activeInstrumentRunServiceMock.getInstrumentType()).andReturn(instrumentType).anyTimes();
    expect(activeInstrumentRunServiceMock.updateReadOnlyInputParameterRunValue()).andReturn(null).anyTimes();
    expect(activeInstrumentRunServiceMock.getInstrumentRun()).andReturn(new InstrumentRun()).anyTimes();

    replay(activeInstrumentRunServiceMock);

    InstrumentLaunchPanel instrumentLaunchPanel = createInstrumentLaunchPanel();

    verify(activeInstrumentRunServiceMock);

    // Verify visibility of the "enter values manually" button (this implies the visibility of its parent).
    AjaxLink manualButton = (AjaxLink) instrumentLaunchPanel.get("measures:manualButton");
    assertNotNull(manualButton);/*from  ww  w .  j  av  a  2 s .c o m*/
    MarkupContainer parent = manualButton.getParent();
    assertNotNull(parent);
    assertTrue(manualButton.isVisible());
    assertTrue(parent.isVisible());
}