Package org.apache.wicket.util

Examples of org.apache.wicket.util.Log4jEventHistory


   */
  public void testRuntimeExceptionTolerance() throws IOException
  {
    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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here


  @Test
  public void runtimeExceptionTolerance() throws IOException
  {
    Logger logger = LogManager.getLogger(CheckingObjectOutputStream.class);
    logger.setLevel(Level.WARN);
    Log4jEventHistory logHistory = new Log4jEventHistory();
    logger.addAppender(logHistory);
    CheckingObjectOutputStream checker = new CheckingObjectOutputStream(new ByteArrayOutputStream(),
        new ObjectSerializationChecker(new NotSerializableException()));
    try
    {
      checker.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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

   */
  public void testRuntimeExceptionTolerance() throws IOException
  {
    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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

  @Test
  public void runtimeExceptionTolerance() throws IOException
  {
    Logger logger = LogManager.getLogger(CheckingObjectOutputStream.class);
    logger.setLevel(Level.WARN);
    Log4jEventHistory logHistory = new Log4jEventHistory();
    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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

  @Test
  public void runtimeExceptionTolerance() throws IOException
  {
    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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

  @Test
  public void runtimeExceptionTolerance() throws IOException
  {
    Logger logger = LogManager.getLogger(CheckingObjectOutputStream.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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

  @Test
  public void runtimeExceptionTolerance() throws IOException
  {
    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)
    {
      fail("Should have just logged on console, the checker is after another problem");
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.Log4jEventHistory

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.