List of usage examples for org.apache.wicket.markup.html.panel Fragment get
@Override public final Component get(String path)
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()); }