Example usage for org.apache.wicket.markup.html.panel Fragment get

List of usage examples for org.apache.wicket.markup.html.panel Fragment get

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.panel Fragment get.

Prototype

@Override
public final Component get(String path) 

Source Link

Document

Get a child component by looking it up with the given path.

Usage

From source file:org.obiba.onyx.webapp.participant.page.UpdateParticipantListWindowTest.java

License:Open Source License

@Test
public void testShowResultSucceeded() {
    UpdateParticipantListWindow window = new UpdateParticipantListWindow("window");

    expect(appointmentManagementServiceMock.getLastAppointmentUpdateStats())
            .andReturn(new AppointmentUpdateStats());

    replay(appointmentManagementServiceMock);
    window.showResult(true);/*  w  w  w .j a  v a 2s  .  c om*/
    verify(appointmentManagementServiceMock);

    Fragment resultFragment = getContentFragment(window);
    Assert.assertTrue(resultFragment instanceof UpdateParticipantListPanel.ResultFragment);

    Label resultLabel = (Label) resultFragment.get("resultLabel");
    Assert.assertEquals("ParticipantsListSuccessfullyUpdated", resultLabel.getDefaultModelObject());
}

From source file:org.obiba.onyx.webapp.participant.page.UpdateParticipantListWindowTest.java

License:Open Source License

@Test
public void testShowResultFailed() {
    UpdateParticipantListWindow window = new UpdateParticipantListWindow("window");
    window.showResult(false);//w  ww.jav  a2  s . c  o m
    Fragment resultFragment = getContentFragment(window);
    Assert.assertTrue(resultFragment instanceof UpdateParticipantListPanel.ResultFragment);

    Label resultLabel = (Label) resultFragment.get("resultLabel");
    Assert.assertEquals("ParticipantListUpdateFailed", resultLabel.getDefaultModelObject());
}