List of usage examples for org.apache.wicket.markup.html.panel Panel getOutputMarkupId
public final boolean getOutputMarkupId()
From source file:org.wicketstuff.progressbar.ProgressBarTest.java
License:Apache License
/** * <p>//from w w w . j a v a2 s.c o m * Test that the progress bar is correctly rendered and updated with the progression model. * </p> * * <p> * This test doesn't take the AJAX self update into account. * </p> */ @Test public void testProgressBar() { WicketTester wt = new WicketTester(); final DummyTask testProgressive = new DummyTask(); Panel progressBar = new ProgressBar("panelId", new ProgressionModel() { private static final long serialVersionUID = 1L; @Override protected Progression getProgression() { return new Progression(testProgressive.getProgress()); } }); wt.startComponentInPage(progressBar, null); wt.assertLabel("panelId:label", "0%"); testProgressive.proceed(50); wt.assertLabel("panelId:label", "50%"); assertTrue(progressBar.getOutputMarkupId()); }
From source file:org.wicketstuff.progressbar.ProgressBarTests.java
License:Apache License
/** * <p>// www. j a v a 2s .com * Test that the progress bar is correctly rendered and updated with the * progression model. * </p> * * <p> * This test doesn't take the AJAX self update into account. * </p> */ @Test public void testProgressBar() { WicketTester wt = new WicketTester(); final DummyTask testProgressive = new DummyTask(); Panel progressBar = wt.startPanel(new TestPanelSource() { public Panel getTestPanel(String panelId) { return new ProgressBar(panelId, new ProgressionModel() { @Override protected Progression getProgression() { return new Progression(testProgressive.getProgress()); } }); } }); wt.assertLabel("panel:label", "0%"); testProgressive.proceed(50); wt.assertLabel("panel:label", "50%"); assertTrue(progressBar.getOutputMarkupId()); }