Package org.apache.wicket.core.util.io

Examples of org.apache.wicket.core.util.io.SerializableChecker.writeObject()


   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }

  /**
   * Asserts that {@link org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream}
   * will check an instance just once, despite it occurs more than once in the object tree
View Full Code Here


    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    String exceptionMessage = null;
    try
    {
      serializableChecker.writeObject(new TestType2());
    }
    catch (CheckingObjectOutputStream.ObjectCheckException e)
    {
      exceptionMessage = e.getMessage();
    }
View Full Code Here

   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }

  /**
   * Asserting an meaningful message get logged on console when serializable checker is testing
   * problematic {@link Object#equals(Object)} method implementations.
View Full Code Here

    logger.addAppender(logHistory);
    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    try
    {
      serializableChecker.writeObject(new TestType1());
      String expectedMessage = "Wasn't possible to check the object 'class org.apache.wicket.util.io.SerializableCheckerTest$ProblematicType' possible due an problematic implementation of equals method";
      assertTrue(logHistory.contains(Level.WARN, expectedMessage));
    }
    catch (TestException notMeaningfulException)
    {
View Full Code Here

    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    String exceptionMessage = null;
    try
    {
      serializableChecker.writeObject(new TestType2());
    }
    catch (CheckingObjectOutputStream.ObjectCheckException e)
    {
      exceptionMessage = e.getMessage();
    }
View Full Code Here

   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new NotSerializableException());
    checker.writeObject(new ValueMap());
  }

  /**
   * Asserting an meaningful message get logged on console when serializable checker is testing
   * problematic {@link Object#equals(Object)} method implementations.
View Full Code Here

    logger.addAppender(logHistory);
    SerializableChecker serializableChecker = new SerializableChecker(
      new NotSerializableException());
    try
    {
      serializableChecker.writeObject(new TestType1());
      String expectedMessage = "Wasn't possible to check the object class org.apache.wicket.util.io.SerializableCheckerTest$ProblematicType possible due an problematic implementation of equals method";
      assertTrue(logHistory.contains(Level.WARN, expectedMessage));
    }
    catch (TestException notMeaningfulException)
    {
View Full Code Here

    SerializableChecker serializableChecker = new SerializableChecker(
      new NotSerializableException());
    String exceptionMessage = null;
    try
    {
      serializableChecker.writeObject(new TestType2());
    }
    catch (WicketNotSerializableException e)
    {
      exceptionMessage = e.getMessage();
    }
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.