Package org.apache.wicket.serialize

Examples of org.apache.wicket.serialize.ISerializer.serialize()


    // 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(),
View Full Code Here


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

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
  }

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
View Full Code Here

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

    ISerializer pageSerializer = getAndCheckSerializer();

    pageSerializer.serialize(page);
  }

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
View Full Code Here

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

    ISerializer pageSerializer = getAndCheckSerializer();

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

    // data length can fluctuate based on the object field values
    Assert.assertEquals("The produced data length is not correct!", 651, data.length);
View Full Code Here

    // 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(),
View Full Code Here

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

    ISerializer pageSerializer = getAndCheckSerializer();

    pageSerializer.serialize(page);
  }

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
View Full Code Here

    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
    Assert.assertTrue(
      "The configured IObjectSerializer is not instance of KryoSerializer! Type: " +
        pageSerializer.getClass(), pageSerializer instanceof KryoSerializer);

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

    // data length can fluctuate based on the object field values
    Assert.assertTrue("The produced data length is not correct!", data.length > 300);
View Full Code Here

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);
 
    ISerializer pageSerializer = Application.get().getFrameworkSettings().getSerializer();
   
    pageSerializer.serialize(page);
  }

}
View Full Code Here

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);
 
    ISerializer pageSerializer = Application.get().getFrameworkSettings().getSerializer();
   
    pageSerializer.serialize(page);
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.