Package org.wicketstuff.pageserializer.fast2

Examples of org.wicketstuff.pageserializer.fast2.WicketApplication


{
  public NotSerializablePage(PageParameters pageParameters)
  {
    super(pageParameters);
   
    add(new NotSerializablePanel("not"));
  }
View Full Code Here


  private final PageParameters pageParameters;

  public SamplePage(PageParameters pageParameters)
  {
    this.pageParameters = pageParameters;
    add(new SamplePanel("sample"));
  }
View Full Code Here

  @Test(expected = Fast2WicketSerialException.class)
  public void notSerializableComponentThrowsException()
  {

    NotSerializablePage page = tester.startPage(NotSerializablePage.class,
        new PageParameters().add("Test", "asString"));

    // assert rendered page class
    tester.assertRenderedPage(NotSerializablePage.class);
View Full Code Here

  @Test
  public void samplepageRendersSuccessfully()
  {
    // start and render the test page
    SamplePage page = tester.startPage(SamplePage.class,
        new PageParameters().add("Test", "asString"));

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
    Assert.assertNotNull("The produced data should not be null!", data);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
        "The deserialized page must be of type HomePage. Type: " + object.getClass(),
        object instanceof SamplePage);

    SamplePage samplePage = (SamplePage)object;

    tester.startPage(samplePage);

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);
View Full Code Here

TOP

Related Classes of org.wicketstuff.pageserializer.fast2.WicketApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.