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

Examples of org.apache.wicket.core.util.io.SerializableChecker


  {
    Logger logger = LogManager.getLogger(SerializableChecker.class);
    logger.setLevel(Level.WARN);
    Log4jEventHistory logHistory = new Log4jEventHistory();
    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


   * @throws IOException
   */
  @Test
  public void nonSerializableTypeDetection() throws IOException
  {
    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

Related Classes of org.apache.wicket.core.util.io.SerializableChecker

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.