Package org.apache.wicket.serialize

Examples of org.apache.wicket.serialize.ISerializer


      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;
View Full Code Here


        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;
View Full Code Here

      new PageParameters().add("Test", "asString"));

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

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
  }
View Full Code Here

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

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
    Assert.assertTrue(
      "The configured IObjectSerializer is not instance of KryoSerializer! Type: " +
        pageSerializer.getClass(), pageSerializer instanceof KryoSerializer);
    return pageSerializer;
  }
View Full Code Here

        new PageParameters().add("Test", "asString"));

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

    ISerializer pageSerializer = getAndCheckSerializer();

    pageSerializer.serialize(page);
  }
View Full Code Here

    pageSerializer.serialize(page);
  }

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
    Assert.assertTrue(
        "The configured IObjectSerializer is not instance of FastSerializer! Type: "
            + pageSerializer.getClass(), pageSerializer instanceof FastWicketSerializer);
    return pageSerializer;
  }
View Full Code Here

    HomePage page = tester.startPage(HomePage.class);

    // 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);

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

  }
View Full Code Here

        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;
View Full Code Here

        new PageParameters().add("Test", "asString"));

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

    ISerializer pageSerializer = getAndCheckSerializer();

    pageSerializer.serialize(page);
  }
View Full Code Here

    pageSerializer.serialize(page);
  }

  private ISerializer getAndCheckSerializer()
  {
    ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
    Assert.assertTrue(
        "The configured IObjectSerializer is not instance of Fast2Serializer! Type: "
            + pageSerializer.getClass(),
        pageSerializer instanceof Fast2WicketSerializer);
    return pageSerializer;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.serialize.ISerializer

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.