1 package net.sourceforge.ejtools.management.test; 2 3 import junit.extensions.jfunc.AssertListener; 4 import junit.framework.AssertionFailedError; 5 import junit.framework.Test; 6 7 import org.apache.log4j.Category; 8 9 17 public class VerboseListener implements AssertListener 18 { 19 20 private static Category logger = Category.getInstance(VerboseListener.class); 21 22 25 public VerboseListener() 26 { 27 super(); 28 } 29 30 33 public void addAssert(Test arg0, String arg1, boolean arg2) 34 { 35 logger.debug("[ ASSERT] (" + arg0 + ") " + arg1 + " = " + arg2); 36 } 37 38 41 public void addError(Test arg0, Throwable arg1) 42 { 43 logger.debug("[ ERROR ] (" + arg0 + ") " + arg1.getMessage()); 44 } 45 46 49 public void addFailure(Test arg0, AssertionFailedError arg1) 50 { 51 logger.debug("[FAILURE] (" + arg0 + ") " + arg1.getMessage()); 52 } 53 54 57 public void endTest(Test arg0) 58 { 59 logger.debug("Test is ending " + arg0); 60 } 61 62 65 public void startTest(Test arg0) 66 { 67 logger.debug("Test is starting " + arg0); 68 } 69 } 70 | Popular Tags |